netwerk/base/src/LoadContextInfo.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/. */
     5 #ifndef nsLoadContextInfo_h__
     6 #define nsLoadContextInfo_h__
     8 #include "nsILoadContextInfo.h"
    10 class nsIChannel;
    11 class nsILoadContext;
    13 namespace mozilla {
    14 namespace net {
    16 class LoadContextInfo : public nsILoadContextInfo
    17 {
    18 public:
    19   NS_DECL_THREADSAFE_ISUPPORTS
    20   NS_DECL_NSILOADCONTEXTINFO
    22   LoadContextInfo(bool aIsPrivate, uint32_t aAppId, bool aIsInBrowser, bool aIsAnonymous);
    24 private:
    25   virtual ~LoadContextInfo();
    27 protected:
    28   uint32_t mAppId;
    29   bool mIsPrivate : 1;
    30   bool mIsInBrowser : 1;
    31   bool mIsAnonymous : 1;
    32 };
    34 LoadContextInfo *
    35 GetLoadContextInfo(nsIChannel * aChannel);
    37 LoadContextInfo *
    38 GetLoadContextInfo(nsILoadContext * aLoadContext,
    39                    bool aAnonymous);
    41 LoadContextInfo *
    42 GetLoadContextInfo(nsILoadContextInfo* aInfo);
    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);
    50 } // net
    51 } // mozilla
    53 #endif

mercurial