michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_net_CookieServiceChild_h__ michael@0: #define mozilla_net_CookieServiceChild_h__ michael@0: michael@0: #include "mozilla/net/PCookieServiceChild.h" michael@0: #include "nsICookieService.h" michael@0: #include "nsIObserver.h" michael@0: #include "nsIPrefBranch.h" michael@0: #include "mozIThirdPartyUtil.h" michael@0: #include "nsWeakReference.h" michael@0: michael@0: namespace mozilla { michael@0: namespace net { michael@0: michael@0: class CookieServiceChild : public PCookieServiceChild michael@0: , public nsICookieService michael@0: , public nsIObserver michael@0: , public nsSupportsWeakReference michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSICOOKIESERVICE michael@0: NS_DECL_NSIOBSERVER michael@0: michael@0: CookieServiceChild(); michael@0: virtual ~CookieServiceChild(); michael@0: michael@0: static CookieServiceChild* GetSingleton(); michael@0: michael@0: protected: michael@0: void SerializeURIs(nsIURI *aHostURI, michael@0: nsIChannel *aChannel, michael@0: nsCString &aHostSpec, michael@0: nsCString &aHostCharset, michael@0: nsCString &aOriginatingSpec, michael@0: nsCString &aOriginatingCharset); michael@0: michael@0: nsresult GetCookieStringInternal(nsIURI *aHostURI, michael@0: nsIChannel *aChannel, michael@0: char **aCookieString, michael@0: bool aFromHttp); michael@0: michael@0: nsresult SetCookieStringInternal(nsIURI *aHostURI, michael@0: nsIChannel *aChannel, michael@0: const char *aCookieString, michael@0: const char *aServerTime, michael@0: bool aFromHttp); michael@0: michael@0: void PrefChanged(nsIPrefBranch *aPrefBranch); michael@0: michael@0: bool RequireThirdPartyCheck(); michael@0: michael@0: nsCOMPtr mThirdPartyUtil; michael@0: uint8_t mCookieBehavior; michael@0: bool mThirdPartySession; michael@0: }; michael@0: michael@0: } michael@0: } michael@0: michael@0: #endif // mozilla_net_CookieServiceChild_h__ michael@0: