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: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
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 | #include "nsrootidl.idl" |
michael@0 | 7 | #include "nsIRDFNode.idl" |
michael@0 | 8 | |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * An nsIRDFResource is an object that has unique identity in the |
michael@0 | 12 | * RDF data model. The object's identity is determined by its URI. |
michael@0 | 13 | */ |
michael@0 | 14 | [scriptable, uuid(fb9686a7-719a-49dc-9107-10dea5739341)] |
michael@0 | 15 | interface nsIRDFResource : nsIRDFNode { |
michael@0 | 16 | /** |
michael@0 | 17 | * The single-byte string value of the resource. |
michael@0 | 18 | * @note THIS IS OBSOLETE. C++ should use GetValueConst and script |
michael@0 | 19 | * should use .valueUTF8 |
michael@0 | 20 | */ |
michael@0 | 21 | readonly attribute string Value; |
michael@0 | 22 | |
michael@0 | 23 | /** |
michael@0 | 24 | * The UTF-8 URI of the resource. |
michael@0 | 25 | */ |
michael@0 | 26 | readonly attribute AUTF8String ValueUTF8; |
michael@0 | 27 | |
michael@0 | 28 | /** |
michael@0 | 29 | * An unscriptable version used to avoid a string copy. Meant |
michael@0 | 30 | * for use as a performance optimization. The string is encoded |
michael@0 | 31 | * in UTF-8. |
michael@0 | 32 | */ |
michael@0 | 33 | [noscript] void GetValueConst([shared] out string aConstValue); |
michael@0 | 34 | |
michael@0 | 35 | /** |
michael@0 | 36 | * This method is called by the nsIRDFService after constructing |
michael@0 | 37 | * a resource object to initialize its URI. You would not normally |
michael@0 | 38 | * call this method directly |
michael@0 | 39 | */ |
michael@0 | 40 | void Init(in string uri); |
michael@0 | 41 | |
michael@0 | 42 | /** |
michael@0 | 43 | * Determine if the resource has the given URI. |
michael@0 | 44 | */ |
michael@0 | 45 | boolean EqualsString(in string aURI); |
michael@0 | 46 | |
michael@0 | 47 | /** |
michael@0 | 48 | * Retrieve the "delegate" object for this resource. A resource |
michael@0 | 49 | * may have several delegate objects, each of whose lifetimes is |
michael@0 | 50 | * bound to the life of the resource object. |
michael@0 | 51 | * |
michael@0 | 52 | * This method will return the delegate for the given key after |
michael@0 | 53 | * QueryInterface()-ing it to the requested IID. |
michael@0 | 54 | * |
michael@0 | 55 | * If no delegate exists for the specified key, this method will |
michael@0 | 56 | * attempt to create one using the component manager. Specifically, |
michael@0 | 57 | * it will combine aKey with the resource's URI scheme to produce |
michael@0 | 58 | * a ContractID as follows: |
michael@0 | 59 | * |
michael@0 | 60 | * component:/rdf/delegate-factory/[key]/[scheme] |
michael@0 | 61 | * |
michael@0 | 62 | * This ContractID will be used to locate a factory using the |
michael@0 | 63 | * FindFactory() method of nsIComponentManager. If the nsIFactory |
michael@0 | 64 | * exists, it will be used to create a "delegate factory"; that |
michael@0 | 65 | * is, an object that supports nsIRDFDelegateFactory. The delegate |
michael@0 | 66 | * factory will be used to construct the delegate object. |
michael@0 | 67 | */ |
michael@0 | 68 | void GetDelegate(in string aKey, in nsIIDRef aIID, |
michael@0 | 69 | [iid_is(aIID),retval] out nsQIResult aResult); |
michael@0 | 70 | |
michael@0 | 71 | /** |
michael@0 | 72 | * Force a delegate to be "unbound" from the resource. |
michael@0 | 73 | * |
michael@0 | 74 | * Normally, a delegate object's lifetime will be identical to |
michael@0 | 75 | * that of the resource to which it is bound; this method allows a |
michael@0 | 76 | * delegate to unlink itself from an RDF resource prematurely. |
michael@0 | 77 | */ |
michael@0 | 78 | void ReleaseDelegate(in string aKey); |
michael@0 | 79 | }; |
michael@0 | 80 | |
michael@0 | 81 |