|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 #ifndef nsLoadContextInfo_h__ |
|
6 #define nsLoadContextInfo_h__ |
|
7 |
|
8 #include "nsILoadContextInfo.h" |
|
9 |
|
10 class nsIChannel; |
|
11 class nsILoadContext; |
|
12 |
|
13 namespace mozilla { |
|
14 namespace net { |
|
15 |
|
16 class LoadContextInfo : public nsILoadContextInfo |
|
17 { |
|
18 public: |
|
19 NS_DECL_THREADSAFE_ISUPPORTS |
|
20 NS_DECL_NSILOADCONTEXTINFO |
|
21 |
|
22 LoadContextInfo(bool aIsPrivate, uint32_t aAppId, bool aIsInBrowser, bool aIsAnonymous); |
|
23 |
|
24 private: |
|
25 virtual ~LoadContextInfo(); |
|
26 |
|
27 protected: |
|
28 uint32_t mAppId; |
|
29 bool mIsPrivate : 1; |
|
30 bool mIsInBrowser : 1; |
|
31 bool mIsAnonymous : 1; |
|
32 }; |
|
33 |
|
34 LoadContextInfo * |
|
35 GetLoadContextInfo(nsIChannel * aChannel); |
|
36 |
|
37 LoadContextInfo * |
|
38 GetLoadContextInfo(nsILoadContext * aLoadContext, |
|
39 bool aAnonymous); |
|
40 |
|
41 LoadContextInfo * |
|
42 GetLoadContextInfo(nsILoadContextInfo* aInfo); |
|
43 |
|
44 LoadContextInfo * |
|
45 GetLoadContextInfo(bool const aIsPrivate = false, |
|
46 uint32_t const aAppId = nsILoadContextInfo::NO_APP_ID, |
|
47 bool const aIsInBrowserElement = false, |
|
48 bool const aIsAnonymous = false); |
|
49 |
|
50 } // net |
|
51 } // mozilla |
|
52 |
|
53 #endif |