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: 4; 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 | /* |
michael@0 | 7 | * browser-specific interface to global history |
michael@0 | 8 | */ |
michael@0 | 9 | |
michael@0 | 10 | #include "nsISupports.idl" |
michael@0 | 11 | #include "nsIGlobalHistory2.idl" |
michael@0 | 12 | |
michael@0 | 13 | [scriptable, uuid(20d31479-38de-49f4-9300-566d6e834c66)] |
michael@0 | 14 | interface nsIBrowserHistory : nsISupports |
michael@0 | 15 | { |
michael@0 | 16 | /** |
michael@0 | 17 | * Removes a page from global history. |
michael@0 | 18 | * |
michael@0 | 19 | * @note It is preferrable to use this one rather then RemovePages when |
michael@0 | 20 | * removing less than 10 pages, since it won't start a full batch |
michael@0 | 21 | * operation. |
michael@0 | 22 | */ |
michael@0 | 23 | void removePage(in nsIURI aURI); |
michael@0 | 24 | |
michael@0 | 25 | /** |
michael@0 | 26 | * Removes a list of pages from global history. |
michael@0 | 27 | * |
michael@0 | 28 | * @param aURIs |
michael@0 | 29 | * Array of URIs to be removed. |
michael@0 | 30 | * @param aLength |
michael@0 | 31 | * Length of the array. |
michael@0 | 32 | * |
michael@0 | 33 | * @note the removal happens in a batch. |
michael@0 | 34 | */ |
michael@0 | 35 | void removePages([array, size_is(aLength)] in nsIURI aURIs, |
michael@0 | 36 | in unsigned long aLength); |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * Removes all global history information about pages for a given host. |
michael@0 | 40 | * |
michael@0 | 41 | * @param aHost |
michael@0 | 42 | * Hostname to be removed. |
michael@0 | 43 | * An empty host name means local files and anything else with no |
michael@0 | 44 | * hostname. You can also pass in the localized "(local files)" |
michael@0 | 45 | * title given to you from a history query to remove all |
michael@0 | 46 | * history information from local files. |
michael@0 | 47 | * @param aEntireDomain |
michael@0 | 48 | * If true, will also delete pages from sub hosts (so if |
michael@0 | 49 | * passed in "microsoft.com" will delete "www.microsoft.com", |
michael@0 | 50 | * "msdn.microsoft.com", etc.). |
michael@0 | 51 | * |
michael@0 | 52 | * @note The removal happens in a batch. |
michael@0 | 53 | */ |
michael@0 | 54 | void removePagesFromHost(in AUTF8String aHost, |
michael@0 | 55 | in boolean aEntireDomain); |
michael@0 | 56 | |
michael@0 | 57 | /** |
michael@0 | 58 | * Removes all pages for a given timeframe. |
michael@0 | 59 | * Limits are included: aBeginTime <= timeframe <= aEndTime |
michael@0 | 60 | * |
michael@0 | 61 | * @param aBeginTime |
michael@0 | 62 | * Microseconds from epoch, representing the initial time. |
michael@0 | 63 | * @param aEndTime |
michael@0 | 64 | * Microseconds from epoch, representing the final time. |
michael@0 | 65 | * |
michael@0 | 66 | * @note The removal happens in a batch. |
michael@0 | 67 | */ |
michael@0 | 68 | void removePagesByTimeframe(in PRTime aBeginTime, |
michael@0 | 69 | in PRTime aEndTime); |
michael@0 | 70 | |
michael@0 | 71 | /** |
michael@0 | 72 | * Removes all visits in a given timeframe. |
michael@0 | 73 | * Limits are included: aBeginTime <= timeframe <= aEndTime. |
michael@0 | 74 | * Any pages that becomes unvisited as a result will also be deleted. |
michael@0 | 75 | * |
michael@0 | 76 | * @param aBeginTime |
michael@0 | 77 | * Microseconds from epoch, representing the initial time. |
michael@0 | 78 | * @param aEndTime |
michael@0 | 79 | * Microseconds from epoch, representing the final time. |
michael@0 | 80 | * |
michael@0 | 81 | * @note The removal happens in a batch. |
michael@0 | 82 | */ |
michael@0 | 83 | void removeVisitsByTimeframe(in PRTime aBeginTime, |
michael@0 | 84 | in PRTime aEndTime); |
michael@0 | 85 | |
michael@0 | 86 | /** |
michael@0 | 87 | * Removes all existing pages from global history. |
michael@0 | 88 | * Visits are removed synchronously, but pages are expired asynchronously |
michael@0 | 89 | * off the main-thread. |
michael@0 | 90 | * |
michael@0 | 91 | * @note The removal happens in a batch. Single removals are not notified, |
michael@0 | 92 | * instead an onClearHistory notification is sent to |
michael@0 | 93 | * nsINavHistoryObserver implementers. |
michael@0 | 94 | */ |
michael@0 | 95 | void removeAllPages(); |
michael@0 | 96 | }; |