netwerk/base/src/LoadContextInfo.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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