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"
19 class CookieServiceChild
: public PCookieServiceChild
20 , public nsICookieService
22 , public nsSupportsWeakReference
26 NS_DECL_NSICOOKIESERVICE
30 virtual ~CookieServiceChild();
32 static CookieServiceChild
* GetSingleton();
35 void SerializeURIs(nsIURI
*aHostURI
,
38 nsCString
&aHostCharset
,
39 nsCString
&aOriginatingSpec
,
40 nsCString
&aOriginatingCharset
);
42 nsresult
GetCookieStringInternal(nsIURI
*aHostURI
,
47 nsresult
SetCookieStringInternal(nsIURI
*aHostURI
,
49 const char *aCookieString
,
50 const char *aServerTime
,
53 void PrefChanged(nsIPrefBranch
*aPrefBranch
);
55 bool RequireThirdPartyCheck();
57 nsCOMPtr
<mozIThirdPartyUtil
> mThirdPartyUtil
;
58 uint8_t mCookieBehavior
;
59 bool mThirdPartySession
;
65 #endif // mozilla_net_CookieServiceChild_h__