Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
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 nsURILoader_h__
7 #define nsURILoader_h__
9 #include "nsCURILoader.h"
10 #include "nsISupportsUtils.h"
11 #include "nsCOMArray.h"
12 #include "nsCOMPtr.h"
13 #include "nsIInterfaceRequestor.h"
14 #include "nsIInterfaceRequestorUtils.h"
15 #include "nsString.h"
16 #include "nsIWeakReference.h"
17 #include "mozilla/Attributes.h"
19 #ifdef MOZ_LOGGING
20 // Uncomment the next line to force logging on in release builds
21 // #define FORCE_PR_LOG
22 #endif
23 #include "prlog.h"
25 class nsDocumentOpenInfo;
27 class nsURILoader MOZ_FINAL : public nsIURILoader
28 {
29 public:
30 NS_DECL_NSIURILOADER
31 NS_DECL_ISUPPORTS
33 nsURILoader();
34 ~nsURILoader();
36 protected:
37 /**
38 * Equivalent to nsIURILoader::openChannel, but allows specifying whether the
39 * channel is opened already.
40 */
41 NS_HIDDEN_(nsresult) OpenChannel(nsIChannel* channel,
42 uint32_t aFlags,
43 nsIInterfaceRequestor* aWindowContext,
44 bool aChannelOpen,
45 nsIStreamListener** aListener);
47 /**
48 * we shouldn't need to have an owning ref count on registered
49 * content listeners because they are supposed to unregister themselves
50 * when they go away. This array stores weak references
51 */
52 nsCOMArray<nsIWeakReference> m_listeners;
54 #ifdef PR_LOGGING
55 /**
56 * NSPR logging. The module is called "URILoader"
57 */
58 static PRLogModuleInfo* mLog;
59 #endif
61 friend class nsDocumentOpenInfo;
62 };
64 #endif /* nsURILoader_h__ */