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 "domstubs.idl" |
michael@0 | 6 | |
michael@0 | 7 | [scriptable, uuid(fb089720-1c5c-11e3-b773-0800200c9a66)] |
michael@0 | 8 | interface nsINotificationStorageCallback : nsISupports |
michael@0 | 9 | { |
michael@0 | 10 | /** |
michael@0 | 11 | * Callback function used to pass single notification back |
michael@0 | 12 | * into C++ land for Notification.get return data. |
michael@0 | 13 | * |
michael@0 | 14 | * @param id: a uuid for this notification |
michael@0 | 15 | * @param title: the notification title |
michael@0 | 16 | * @param dir: the notification direction, |
michael@0 | 17 | * possible values are "ltr", "rtl", "auto" |
michael@0 | 18 | * @param lang: the notification language |
michael@0 | 19 | * @param body: the notification body |
michael@0 | 20 | * @param tag: the notification tag |
michael@0 | 21 | */ |
michael@0 | 22 | [implicit_jscontext] |
michael@0 | 23 | void handle(in DOMString id, |
michael@0 | 24 | in DOMString title, |
michael@0 | 25 | in DOMString dir, |
michael@0 | 26 | in DOMString lang, |
michael@0 | 27 | in DOMString body, |
michael@0 | 28 | in DOMString tag, |
michael@0 | 29 | in DOMString icon); |
michael@0 | 30 | |
michael@0 | 31 | /** |
michael@0 | 32 | * Callback function used to notify C++ the we have returned |
michael@0 | 33 | * all notification objects for this Notification.get call. |
michael@0 | 34 | */ |
michael@0 | 35 | [implicit_jscontext] |
michael@0 | 36 | void done(); |
michael@0 | 37 | }; |
michael@0 | 38 | |
michael@0 | 39 | /** |
michael@0 | 40 | * Interface for notification persistence layer. |
michael@0 | 41 | */ |
michael@0 | 42 | [scriptable, uuid(b177b080-2a23-11e3-8224-0800200c9a66)] |
michael@0 | 43 | interface nsINotificationStorage : nsISupports |
michael@0 | 44 | { |
michael@0 | 45 | |
michael@0 | 46 | /** |
michael@0 | 47 | * Add/replace a notification to the persistence layer. |
michael@0 | 48 | * |
michael@0 | 49 | * @param origin: the origin/app of this notification |
michael@0 | 50 | * @param id: a uuid for this notification |
michael@0 | 51 | * @param title: the notification title |
michael@0 | 52 | * @param dir: the notification direction, |
michael@0 | 53 | * possible values are "ltr", "rtl", "auto" |
michael@0 | 54 | * @param lang: the notification language |
michael@0 | 55 | * @param body: the notification body |
michael@0 | 56 | * @param tag: notification tag, will replace any existing |
michael@0 | 57 | * notifications with same origin/tag pair |
michael@0 | 58 | */ |
michael@0 | 59 | void put(in DOMString origin, |
michael@0 | 60 | in DOMString id, |
michael@0 | 61 | in DOMString title, |
michael@0 | 62 | in DOMString dir, |
michael@0 | 63 | in DOMString lang, |
michael@0 | 64 | in DOMString body, |
michael@0 | 65 | in DOMString tag, |
michael@0 | 66 | in DOMString icon); |
michael@0 | 67 | |
michael@0 | 68 | /** |
michael@0 | 69 | * Retrieve a list of notifications. |
michael@0 | 70 | * |
michael@0 | 71 | * @param origin: the origin/app for which to fetch notifications from |
michael@0 | 72 | * @param tag: used to fetch only a specific tag |
michael@0 | 73 | * @param callback: nsINotificationStorageCallback, used for |
michael@0 | 74 | * returning notifications objects |
michael@0 | 75 | */ |
michael@0 | 76 | void get(in DOMString origin, |
michael@0 | 77 | in DOMString tag, |
michael@0 | 78 | in nsINotificationStorageCallback aCallback); |
michael@0 | 79 | |
michael@0 | 80 | /** |
michael@0 | 81 | * Remove a notification from storage. |
michael@0 | 82 | * |
michael@0 | 83 | * @param origin: the origin/app to delete the notification from |
michael@0 | 84 | * @param id: the uuid for the notification to delete |
michael@0 | 85 | */ |
michael@0 | 86 | void delete(in DOMString origin, |
michael@0 | 87 | in DOMString id); |
michael@0 | 88 | }; |
michael@0 | 89 | |
michael@0 | 90 | %{C++ |
michael@0 | 91 | #define NS_NOTIFICATION_STORAGE_CONTRACTID "@mozilla.org/notificationStorage;1" |
michael@0 | 92 | %} |