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.
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 nsIDOMScriptObjectFactory_h__ |
michael@0 | 7 | #define nsIDOMScriptObjectFactory_h__ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsISupports.h" |
michael@0 | 10 | #include "nsIDOMClassInfo.h" |
michael@0 | 11 | #include "nsString.h" |
michael@0 | 12 | |
michael@0 | 13 | #define NS_IDOM_SCRIPT_OBJECT_FACTORY_IID \ |
michael@0 | 14 | { 0x2a50e17c, 0x46ff, 0x4150, \ |
michael@0 | 15 | { 0xbb, 0x46, 0xd8, 0x07, 0xb3, 0x36, 0xde, 0xab } } |
michael@0 | 16 | |
michael@0 | 17 | class nsIScriptContext; |
michael@0 | 18 | class nsIScriptGlobalObject; |
michael@0 | 19 | class nsIDOMEventListener; |
michael@0 | 20 | |
michael@0 | 21 | typedef nsXPCClassInfo* (*nsDOMClassInfoExternalConstructorFnc) |
michael@0 | 22 | (const char* aName); |
michael@0 | 23 | |
michael@0 | 24 | class nsIDOMScriptObjectFactory : public nsISupports { |
michael@0 | 25 | public: |
michael@0 | 26 | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOM_SCRIPT_OBJECT_FACTORY_IID) |
michael@0 | 27 | |
michael@0 | 28 | NS_IMETHOD_(nsISupports *) GetClassInfoInstance(nsDOMClassInfoID aID) = 0; |
michael@0 | 29 | NS_IMETHOD_(nsISupports *) GetExternalClassInfoInstance(const nsAString& aName) = 0; |
michael@0 | 30 | |
michael@0 | 31 | // Register the info for an external class. aName must be static |
michael@0 | 32 | // data, it will not be deleted by the DOM code. aProtoChainInterface |
michael@0 | 33 | // must be registered in the JAVASCRIPT_DOM_INTERFACE category, or |
michael@0 | 34 | // prototypes for this class won't work (except if the interface |
michael@0 | 35 | // name starts with nsIDOM). |
michael@0 | 36 | NS_IMETHOD RegisterDOMClassInfo(const char *aName, |
michael@0 | 37 | nsDOMClassInfoExternalConstructorFnc aConstructorFptr, |
michael@0 | 38 | const nsIID *aProtoChainInterface, |
michael@0 | 39 | const nsIID **aInterfaces, |
michael@0 | 40 | uint32_t aScriptableFlags, |
michael@0 | 41 | bool aHasClassInterface, |
michael@0 | 42 | const nsCID *aConstructorCID) = 0; |
michael@0 | 43 | }; |
michael@0 | 44 | |
michael@0 | 45 | NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMScriptObjectFactory, |
michael@0 | 46 | NS_IDOM_SCRIPT_OBJECT_FACTORY_IID) |
michael@0 | 47 | |
michael@0 | 48 | #endif /* nsIDOMScriptObjectFactory_h__ */ |