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: IDL; tab-width: 8; 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 "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | [ptr] native const_nsID_ptr(const nsID); |
michael@0 | 9 | |
michael@0 | 10 | [builtinclass, scriptable, uuid(62883d14-4146-4039-94f5-a5e1e1a51a15)] |
michael@0 | 11 | interface nsIJSID : nsISupports |
michael@0 | 12 | { |
michael@0 | 13 | readonly attribute string name; |
michael@0 | 14 | readonly attribute string number; |
michael@0 | 15 | readonly attribute boolean valid; |
michael@0 | 16 | |
michael@0 | 17 | boolean equals(in nsIJSID other); |
michael@0 | 18 | string toString(); |
michael@0 | 19 | |
michael@0 | 20 | [noscript] void initialize(in string idString); |
michael@0 | 21 | |
michael@0 | 22 | // returns a pointer to the internal nsID. this pointer is only valid |
michael@0 | 23 | // while the nsIJSID object remains alive! |
michael@0 | 24 | [notxpcom] const_nsID_ptr getID(); |
michael@0 | 25 | }; |
michael@0 | 26 | |
michael@0 | 27 | [builtinclass, scriptable, uuid(e76ec564-a080-4705-8609-384c755ec91e)] |
michael@0 | 28 | interface nsIJSIID : nsIJSID |
michael@0 | 29 | { |
michael@0 | 30 | }; |
michael@0 | 31 | |
michael@0 | 32 | [builtinclass, scriptable, uuid(bf5eb086-9eaa-4694-aec3-fe4aac6119bd)] |
michael@0 | 33 | interface nsIJSCID : nsIJSID |
michael@0 | 34 | { |
michael@0 | 35 | [implicit_jscontext,optional_argc] jsval createInstance([optional] in jsval iid); |
michael@0 | 36 | [implicit_jscontext,optional_argc] jsval getService([optional] in jsval iid); |
michael@0 | 37 | }; |
michael@0 | 38 | |
michael@0 | 39 | /* this goes into the C++ header verbatim. */ |
michael@0 | 40 | %{ C++ |
michael@0 | 41 | /********************************************************/ |
michael@0 | 42 | // {F24A14F0-4FA1-11d3-9894-006008962422} |
michael@0 | 43 | #define NS_JS_ID_CID \ |
michael@0 | 44 | { 0xf24a14f0, 0x4fa1, 0x11d3, \ |
michael@0 | 45 | { 0x98, 0x94, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } |
michael@0 | 46 | %} |
michael@0 | 47 |