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: 8; 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 | #ifndef nsAnnoProtocolHandler_h___ |
michael@0 | 7 | #define nsAnnoProtocolHandler_h___ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsCOMPtr.h" |
michael@0 | 10 | #include "nsIProtocolHandler.h" |
michael@0 | 11 | #include "nsIURI.h" |
michael@0 | 12 | #include "nsString.h" |
michael@0 | 13 | #include "nsWeakReference.h" |
michael@0 | 14 | #include "mozilla/Attributes.h" |
michael@0 | 15 | |
michael@0 | 16 | // {e8b8bdb7-c96c-4d82-9c6f-2b3c585ec7ea} |
michael@0 | 17 | #define NS_ANNOPROTOCOLHANDLER_CID \ |
michael@0 | 18 | { 0xe8b8bdb7, 0xc96c, 0x4d82, { 0x9c, 0x6f, 0x2b, 0x3c, 0x58, 0x5e, 0xc7, 0xea } } |
michael@0 | 19 | |
michael@0 | 20 | class nsAnnoProtocolHandler MOZ_FINAL : public nsIProtocolHandler, public nsSupportsWeakReference |
michael@0 | 21 | { |
michael@0 | 22 | public: |
michael@0 | 23 | nsAnnoProtocolHandler() {} |
michael@0 | 24 | |
michael@0 | 25 | NS_DECL_ISUPPORTS |
michael@0 | 26 | NS_DECL_NSIPROTOCOLHANDLER |
michael@0 | 27 | |
michael@0 | 28 | private: |
michael@0 | 29 | ~nsAnnoProtocolHandler() {} |
michael@0 | 30 | |
michael@0 | 31 | protected: |
michael@0 | 32 | nsresult ParseAnnoURI(nsIURI* aURI, nsIURI** aResultURI, nsCString& aName); |
michael@0 | 33 | |
michael@0 | 34 | /** |
michael@0 | 35 | * Obtains a new channel to be used to get a favicon from the database. This |
michael@0 | 36 | * method is asynchronous. |
michael@0 | 37 | * |
michael@0 | 38 | * @param aURI |
michael@0 | 39 | * The URI the channel will be created for. This is the URI that is |
michael@0 | 40 | * set as the original URI on the channel. |
michael@0 | 41 | * @param aAnnotationURI |
michael@0 | 42 | * The URI that holds the data needed to get the favicon from the |
michael@0 | 43 | * database. |
michael@0 | 44 | * @returns (via _channel) the channel that will obtain the favicon data. |
michael@0 | 45 | */ |
michael@0 | 46 | nsresult NewFaviconChannel(nsIURI *aURI, |
michael@0 | 47 | nsIURI *aAnnotationURI, |
michael@0 | 48 | nsIChannel **_channel); |
michael@0 | 49 | }; |
michael@0 | 50 | |
michael@0 | 51 | #endif /* nsAnnoProtocolHandler_h___ */ |