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: 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 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIURI; |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * This interface provides a way to stream data to the web browser. This allows |
michael@0 | 12 | * loading of data from sources which can not be accessed using URIs and |
michael@0 | 13 | * nsIWebNavigation. |
michael@0 | 14 | */ |
michael@0 | 15 | [scriptable, uuid(86d02f0e-219b-4cfc-9c88-bd98d2cce0b8)] |
michael@0 | 16 | interface nsIWebBrowserStream : nsISupports |
michael@0 | 17 | { |
michael@0 | 18 | /** |
michael@0 | 19 | * Prepare to load a stream of data. When this function returns successfully, |
michael@0 | 20 | * it must be paired by a call to closeStream. |
michael@0 | 21 | * |
michael@0 | 22 | * @param aBaseURI |
michael@0 | 23 | * The base URI of the data. Must not be null. Relative |
michael@0 | 24 | * URIs will be resolved relative to this URI. |
michael@0 | 25 | * @param aContentType |
michael@0 | 26 | * ASCII string giving the content type of the data. If rendering |
michael@0 | 27 | * content of this type is not supported, this method fails. |
michael@0 | 28 | * This string may include a charset declaration, for example: |
michael@0 | 29 | * text/html;charset=ISO-8859-1 |
michael@0 | 30 | * |
michael@0 | 31 | * @throw NS_ERROR_NOT_AVAILABLE |
michael@0 | 32 | * The requested content type is not supported. |
michael@0 | 33 | * @throw NS_ERROR_IN_PROGRESS |
michael@0 | 34 | * openStream was called twice without an intermediate closeStream. |
michael@0 | 35 | */ |
michael@0 | 36 | void openStream(in nsIURI aBaseURI, in ACString aContentType); |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * Append data to this stream. |
michael@0 | 40 | * @param aData The data to append |
michael@0 | 41 | * @param aLen Length of the data to append. |
michael@0 | 42 | * |
michael@0 | 43 | * @note To append more than 4 GB of data, call this method multiple times. |
michael@0 | 44 | */ |
michael@0 | 45 | void appendToStream([const, array, size_is(aLen)] in octet aData, |
michael@0 | 46 | in unsigned long aLen); |
michael@0 | 47 | |
michael@0 | 48 | /** |
michael@0 | 49 | * Notifies the browser that all the data has been appended. This may notify |
michael@0 | 50 | * the user that the browser is "done loading" in some form. |
michael@0 | 51 | * |
michael@0 | 52 | * @throw NS_ERROR_UNEXPECTED |
michael@0 | 53 | * This method was called without a preceding openStream. |
michael@0 | 54 | */ |
michael@0 | 55 | void closeStream(); |
michael@0 | 56 | }; |