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 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "nsISupports.idl" |
michael@0 | 6 | |
michael@0 | 7 | interface nsIUTF8StringEnumerator; |
michael@0 | 8 | interface nsIFile; |
michael@0 | 9 | |
michael@0 | 10 | [scriptable, uuid(7eb955f6-3e78-4d39-b72f-c1bf12a94bce)] |
michael@0 | 11 | interface nsIINIParser : nsISupports |
michael@0 | 12 | { |
michael@0 | 13 | /** |
michael@0 | 14 | * Enumerates the [section]s available in the INI file. |
michael@0 | 15 | */ |
michael@0 | 16 | nsIUTF8StringEnumerator getSections(); |
michael@0 | 17 | |
michael@0 | 18 | /** |
michael@0 | 19 | * Enumerates the keys available within a section. |
michael@0 | 20 | */ |
michael@0 | 21 | nsIUTF8StringEnumerator getKeys(in AUTF8String aSection); |
michael@0 | 22 | |
michael@0 | 23 | /** |
michael@0 | 24 | * Get the value of a string for a particular section and key. |
michael@0 | 25 | */ |
michael@0 | 26 | AUTF8String getString(in AUTF8String aSection, in AUTF8String aKey); |
michael@0 | 27 | }; |
michael@0 | 28 | |
michael@0 | 29 | [scriptable, uuid(b67bb24b-31a3-4a6a-a5d9-0485c9af5a04)] |
michael@0 | 30 | interface nsIINIParserWriter : nsISupports |
michael@0 | 31 | { |
michael@0 | 32 | /** |
michael@0 | 33 | * Windows and the NSIS installer code sometimes expect INI files to be in |
michael@0 | 34 | * UTF-16 encoding. On Windows only, this flag to writeFile can be used to |
michael@0 | 35 | * change the encoding from its default UTF-8. |
michael@0 | 36 | */ |
michael@0 | 37 | const unsigned long WRITE_UTF16 = 0x1; |
michael@0 | 38 | |
michael@0 | 39 | /** |
michael@0 | 40 | * Set the value of a string for a particular section and key. |
michael@0 | 41 | */ |
michael@0 | 42 | void setString(in AUTF8String aSection, in AUTF8String aKey, in AUTF8String aValue); |
michael@0 | 43 | |
michael@0 | 44 | /** |
michael@0 | 45 | * Write to the INI file. |
michael@0 | 46 | */ |
michael@0 | 47 | void writeFile([optional] in nsIFile aINIFile, |
michael@0 | 48 | [optional] in unsigned long aFlags); |
michael@0 | 49 | }; |
michael@0 | 50 | |
michael@0 | 51 | [scriptable, uuid(ccae7ea5-1218-4b51-aecb-c2d8ecd46af9)] |
michael@0 | 52 | interface nsIINIParserFactory : nsISupports |
michael@0 | 53 | { |
michael@0 | 54 | /** |
michael@0 | 55 | * Create an iniparser instance from a local file. |
michael@0 | 56 | */ |
michael@0 | 57 | nsIINIParser createINIParser(in nsIFile aINIFile); |
michael@0 | 58 | }; |