1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/cookie/CookieServiceChild.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,66 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef mozilla_net_CookieServiceChild_h__ 1.10 +#define mozilla_net_CookieServiceChild_h__ 1.11 + 1.12 +#include "mozilla/net/PCookieServiceChild.h" 1.13 +#include "nsICookieService.h" 1.14 +#include "nsIObserver.h" 1.15 +#include "nsIPrefBranch.h" 1.16 +#include "mozIThirdPartyUtil.h" 1.17 +#include "nsWeakReference.h" 1.18 + 1.19 +namespace mozilla { 1.20 +namespace net { 1.21 + 1.22 +class CookieServiceChild : public PCookieServiceChild 1.23 + , public nsICookieService 1.24 + , public nsIObserver 1.25 + , public nsSupportsWeakReference 1.26 +{ 1.27 +public: 1.28 + NS_DECL_ISUPPORTS 1.29 + NS_DECL_NSICOOKIESERVICE 1.30 + NS_DECL_NSIOBSERVER 1.31 + 1.32 + CookieServiceChild(); 1.33 + virtual ~CookieServiceChild(); 1.34 + 1.35 + static CookieServiceChild* GetSingleton(); 1.36 + 1.37 +protected: 1.38 + void SerializeURIs(nsIURI *aHostURI, 1.39 + nsIChannel *aChannel, 1.40 + nsCString &aHostSpec, 1.41 + nsCString &aHostCharset, 1.42 + nsCString &aOriginatingSpec, 1.43 + nsCString &aOriginatingCharset); 1.44 + 1.45 + nsresult GetCookieStringInternal(nsIURI *aHostURI, 1.46 + nsIChannel *aChannel, 1.47 + char **aCookieString, 1.48 + bool aFromHttp); 1.49 + 1.50 + nsresult SetCookieStringInternal(nsIURI *aHostURI, 1.51 + nsIChannel *aChannel, 1.52 + const char *aCookieString, 1.53 + const char *aServerTime, 1.54 + bool aFromHttp); 1.55 + 1.56 + void PrefChanged(nsIPrefBranch *aPrefBranch); 1.57 + 1.58 + bool RequireThirdPartyCheck(); 1.59 + 1.60 + nsCOMPtr<mozIThirdPartyUtil> mThirdPartyUtil; 1.61 + uint8_t mCookieBehavior; 1.62 + bool mThirdPartySession; 1.63 +}; 1.64 + 1.65 +} 1.66 +} 1.67 + 1.68 +#endif // mozilla_net_CookieServiceChild_h__ 1.69 +