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 nsIDOMWindow; |
michael@0 | 8 | interface nsIURI; |
michael@0 | 9 | interface nsIVariant; |
michael@0 | 10 | |
michael@0 | 11 | /** |
michael@0 | 12 | * amIWebInstallInfo is used by the default implementation of |
michael@0 | 13 | * amIWebInstallListener to communicate with the running application and allow |
michael@0 | 14 | * it to warn the user about blocked installs and start the installs running. |
michael@0 | 15 | */ |
michael@0 | 16 | [scriptable, uuid(8710e692-3989-4dc7-b607-40d57610ae75)] |
michael@0 | 17 | interface amIWebInstallInfo : nsISupports |
michael@0 | 18 | { |
michael@0 | 19 | readonly attribute nsIDOMWindow originatingWindow; |
michael@0 | 20 | readonly attribute nsIURI originatingURI; |
michael@0 | 21 | readonly attribute nsIVariant installs; |
michael@0 | 22 | |
michael@0 | 23 | /** |
michael@0 | 24 | * Starts all installs. |
michael@0 | 25 | */ |
michael@0 | 26 | void install(); |
michael@0 | 27 | }; |
michael@0 | 28 | |
michael@0 | 29 | /** |
michael@0 | 30 | * The registered amIWebInstallListener is used to notify about new installs |
michael@0 | 31 | * triggered by websites. The default implementation displays a confirmation |
michael@0 | 32 | * dialog when add-ons are ready to install and uses the observer service to |
michael@0 | 33 | * notify when installations are blocked. |
michael@0 | 34 | */ |
michael@0 | 35 | [scriptable, uuid(a5503979-89c8-441e-9e4a-321df379c172)] |
michael@0 | 36 | interface amIWebInstallListener : nsISupports |
michael@0 | 37 | { |
michael@0 | 38 | /** |
michael@0 | 39 | * Called when installation by websites is currently disabled. |
michael@0 | 40 | * |
michael@0 | 41 | * @param aWindow |
michael@0 | 42 | * The window that triggered the installs |
michael@0 | 43 | * @param aUri |
michael@0 | 44 | * The URI of the site that triggered the installs |
michael@0 | 45 | * @param aInstalls |
michael@0 | 46 | * The AddonInstalls that were blocked |
michael@0 | 47 | * @param aCount |
michael@0 | 48 | * The number of AddonInstalls |
michael@0 | 49 | */ |
michael@0 | 50 | void onWebInstallDisabled(in nsIDOMWindow aWindow, in nsIURI aUri, |
michael@0 | 51 | [array, size_is(aCount)] in nsIVariant aInstalls, |
michael@0 | 52 | [optional] in uint32_t aCount); |
michael@0 | 53 | |
michael@0 | 54 | /** |
michael@0 | 55 | * Called when the website is not allowed to directly prompt the user to |
michael@0 | 56 | * install add-ons. |
michael@0 | 57 | * |
michael@0 | 58 | * @param aWindow |
michael@0 | 59 | * The window that triggered the installs |
michael@0 | 60 | * @param aUri |
michael@0 | 61 | * The URI of the site that triggered the installs |
michael@0 | 62 | * @param aInstalls |
michael@0 | 63 | * The AddonInstalls that were blocked |
michael@0 | 64 | * @param aCount |
michael@0 | 65 | * The number of AddonInstalls |
michael@0 | 66 | * @return true if the caller should start the installs |
michael@0 | 67 | */ |
michael@0 | 68 | boolean onWebInstallBlocked(in nsIDOMWindow aWindow, in nsIURI aUri, |
michael@0 | 69 | [array, size_is(aCount)] in nsIVariant aInstalls, |
michael@0 | 70 | [optional] in uint32_t aCount); |
michael@0 | 71 | |
michael@0 | 72 | /** |
michael@0 | 73 | * Called when a website wants to ask the user to install add-ons. |
michael@0 | 74 | * |
michael@0 | 75 | * @param aWindow |
michael@0 | 76 | * The window that triggered the installs |
michael@0 | 77 | * @param aUri |
michael@0 | 78 | * The URI of the site that triggered the installs |
michael@0 | 79 | * @param aInstalls |
michael@0 | 80 | * The AddonInstalls that were requested |
michael@0 | 81 | * @param aCount |
michael@0 | 82 | * The number of AddonInstalls |
michael@0 | 83 | * @return true if the caller should start the installs |
michael@0 | 84 | */ |
michael@0 | 85 | boolean onWebInstallRequested(in nsIDOMWindow aWindow, in nsIURI aUri, |
michael@0 | 86 | [array, size_is(aCount)] in nsIVariant aInstalls, |
michael@0 | 87 | [optional] in uint32_t aCount); |
michael@0 | 88 | }; |
michael@0 | 89 | |
michael@0 | 90 | /** |
michael@0 | 91 | * amIWebInstallPrompt is used, if available, by the default implementation of |
michael@0 | 92 | * amIWebInstallInfo to display a confirmation UI to the user before running |
michael@0 | 93 | * installs. |
michael@0 | 94 | */ |
michael@0 | 95 | [scriptable, uuid(c5529918-4291-4b56-bd46-e9268900f2a3)] |
michael@0 | 96 | interface amIWebInstallPrompt : nsISupports |
michael@0 | 97 | { |
michael@0 | 98 | /** |
michael@0 | 99 | * Get a confirmation that the user wants to start the installs. |
michael@0 | 100 | * |
michael@0 | 101 | * @param aWindow |
michael@0 | 102 | * The window that triggered the installs |
michael@0 | 103 | * @param aUri |
michael@0 | 104 | * The URI of the site that triggered the installs |
michael@0 | 105 | * @param aInstalls |
michael@0 | 106 | * The AddonInstalls that were requested |
michael@0 | 107 | * @param aCount |
michael@0 | 108 | * The number of AddonInstalls |
michael@0 | 109 | */ |
michael@0 | 110 | void confirm(in nsIDOMWindow aWindow, in nsIURI aUri, |
michael@0 | 111 | [array, size_is(aCount)] in nsIVariant aInstalls, |
michael@0 | 112 | [optional] in uint32_t aCount); |
michael@0 | 113 | }; |