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