netwerk/cookie/CookieServiceChild.h

Wed, 31 Dec 2014 06:55:46 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:46 +0100
changeset 1
ca08bd8f51b2
permissions
-rw-r--r--

Added tag TORBROWSER_REPLICA for changeset 6474c204b198

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef mozilla_net_CookieServiceChild_h__
     7 #define mozilla_net_CookieServiceChild_h__
     9 #include "mozilla/net/PCookieServiceChild.h"
    10 #include "nsICookieService.h"
    11 #include "nsIObserver.h"
    12 #include "nsIPrefBranch.h"
    13 #include "mozIThirdPartyUtil.h"
    14 #include "nsWeakReference.h"
    16 namespace mozilla {
    17 namespace net {
    19 class CookieServiceChild : public PCookieServiceChild
    20                          , public nsICookieService
    21                          , public nsIObserver
    22                          , public nsSupportsWeakReference
    23 {
    24 public:
    25   NS_DECL_ISUPPORTS
    26   NS_DECL_NSICOOKIESERVICE
    27   NS_DECL_NSIOBSERVER
    29   CookieServiceChild();
    30   virtual ~CookieServiceChild();
    32   static CookieServiceChild* GetSingleton();
    34 protected:
    35   void SerializeURIs(nsIURI *aHostURI,
    36                      nsIChannel *aChannel,
    37                      nsCString &aHostSpec,
    38                      nsCString &aHostCharset,
    39                      nsCString &aOriginatingSpec,
    40                      nsCString &aOriginatingCharset);
    42   nsresult GetCookieStringInternal(nsIURI *aHostURI,
    43                                    nsIChannel *aChannel,
    44                                    char **aCookieString,
    45                                    bool aFromHttp);
    47   nsresult SetCookieStringInternal(nsIURI *aHostURI,
    48                                    nsIChannel *aChannel,
    49                                    const char *aCookieString,
    50                                    const char *aServerTime,
    51                                    bool aFromHttp);
    53   void PrefChanged(nsIPrefBranch *aPrefBranch);
    55   bool RequireThirdPartyCheck();
    57   nsCOMPtr<mozIThirdPartyUtil> mThirdPartyUtil;
    58   uint8_t mCookieBehavior;
    59   bool mThirdPartySession;
    60 };
    62 }
    63 }
    65 #endif // mozilla_net_CookieServiceChild_h__

mercurial