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: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
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 | interface nsIFile; |
michael@0 | 8 | |
michael@0 | 9 | /** |
michael@0 | 10 | * Helper interface for nsIProfileMigrator. |
michael@0 | 11 | * |
michael@0 | 12 | * @provider Toolkit (Startup code) |
michael@0 | 13 | * @client Application (Profile-migration code) |
michael@0 | 14 | * @obtainable nsIProfileMigrator.migrate |
michael@0 | 15 | */ |
michael@0 | 16 | [scriptable, uuid(048e5ca1-0eb7-4bb1-a9a2-a36f7d4e0e3c)] |
michael@0 | 17 | interface nsIProfileStartup : nsISupports |
michael@0 | 18 | { |
michael@0 | 19 | /** |
michael@0 | 20 | * The root directory of the semi-current profile, during profile migration. |
michael@0 | 21 | * After nsIProfileMigrator.migrate has returned, this object will not be |
michael@0 | 22 | * useful. |
michael@0 | 23 | */ |
michael@0 | 24 | readonly attribute nsIFile directory; |
michael@0 | 25 | |
michael@0 | 26 | /** |
michael@0 | 27 | * Do profile-startup by setting NS_APP_USER_PROFILE_50_DIR in the directory |
michael@0 | 28 | * service and notifying the profile-startup observer topics. |
michael@0 | 29 | */ |
michael@0 | 30 | void doStartup(); |
michael@0 | 31 | }; |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * Migrate application settings from an outside source. |
michael@0 | 35 | * |
michael@0 | 36 | * @provider Application (Profile-migration code) |
michael@0 | 37 | * @client Toolkit (Startup code) |
michael@0 | 38 | * @obtainable service, contractid("@mozilla.org/toolkit/profile-migrator;1") |
michael@0 | 39 | */ |
michael@0 | 40 | [scriptable, uuid(3df284a5-2258-4d46-a664-761ecdc04c22)] |
michael@0 | 41 | interface nsIProfileMigrator : nsISupports |
michael@0 | 42 | { |
michael@0 | 43 | /** |
michael@0 | 44 | * Migrate data from an outside source, if possible. Does nothing |
michael@0 | 45 | * otherwise. |
michael@0 | 46 | * |
michael@0 | 47 | * When this method is called, a default profile has been created; |
michael@0 | 48 | * XPCOM has been initialized such that compreg.dat is in the |
michael@0 | 49 | * profile; the directory service does *not* return a key for |
michael@0 | 50 | * NS_APP_USER_PROFILE_50_DIR or any of the keys depending on an active |
michael@0 | 51 | * profile. To figure out the directory of the "current" profile, use |
michael@0 | 52 | * aStartup.directory. |
michael@0 | 53 | * |
michael@0 | 54 | * If your migrator needs to access services that use the profile (to |
michael@0 | 55 | * set profile prefs or bookmarks, for example), use aStartup.doStartup. |
michael@0 | 56 | * |
michael@0 | 57 | * @param aStartup nsIProfileStartup object to use during migration. |
michael@0 | 58 | * @param aKey optional key of a migrator to use to skip source selection. |
michael@0 | 59 | * |
michael@0 | 60 | * @note The startup code ignores COM exceptions thrown from this method. |
michael@0 | 61 | */ |
michael@0 | 62 | void migrate(in nsIProfileStartup aStartup, in ACString aKey); |
michael@0 | 63 | }; |
michael@0 | 64 | |
michael@0 | 65 | %{C++ |
michael@0 | 66 | #define NS_PROFILEMIGRATOR_CONTRACTID "@mozilla.org/toolkit/profile-migrator;1" |
michael@0 | 67 | %} |