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 | #ifndef nsXULTemplateResultXML_h__ |
michael@0 | 7 | #define nsXULTemplateResultXML_h__ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsCOMPtr.h" |
michael@0 | 10 | #include "nsIURI.h" |
michael@0 | 11 | #include "nsIRDFResource.h" |
michael@0 | 12 | #include "nsXULTemplateQueryProcessorXML.h" |
michael@0 | 13 | #include "nsIXULTemplateResult.h" |
michael@0 | 14 | #include "mozilla/Attributes.h" |
michael@0 | 15 | |
michael@0 | 16 | /** |
michael@0 | 17 | * An single result of an query |
michael@0 | 18 | */ |
michael@0 | 19 | class nsXULTemplateResultXML MOZ_FINAL : public nsIXULTemplateResult |
michael@0 | 20 | { |
michael@0 | 21 | public: |
michael@0 | 22 | NS_DECL_ISUPPORTS |
michael@0 | 23 | |
michael@0 | 24 | NS_DECL_NSIXULTEMPLATERESULT |
michael@0 | 25 | |
michael@0 | 26 | nsXULTemplateResultXML(nsXMLQuery* aQuery, |
michael@0 | 27 | nsIDOMNode* aNode, |
michael@0 | 28 | nsXMLBindingSet* aBindings); |
michael@0 | 29 | |
michael@0 | 30 | ~nsXULTemplateResultXML() {} |
michael@0 | 31 | |
michael@0 | 32 | void GetNode(nsIDOMNode** aNode); |
michael@0 | 33 | |
michael@0 | 34 | protected: |
michael@0 | 35 | |
michael@0 | 36 | // ID used for persisting data. It is constructed using the mNode's |
michael@0 | 37 | // base uri plus the node's id to form 'baseuri#id'. If the node has no |
michael@0 | 38 | // id, then an id of the form 'row<some number>' is generated. In the |
michael@0 | 39 | // latter case, persistence will not work as there won't be a unique id. |
michael@0 | 40 | nsAutoString mId; |
michael@0 | 41 | |
michael@0 | 42 | // query that generated the result |
michael@0 | 43 | nsCOMPtr<nsXMLQuery> mQuery; |
michael@0 | 44 | |
michael@0 | 45 | // context node in datasource |
michael@0 | 46 | nsCOMPtr<nsIDOMNode> mNode; |
michael@0 | 47 | |
michael@0 | 48 | // assignments in query |
michael@0 | 49 | nsXMLBindingValues mRequiredValues; |
michael@0 | 50 | |
michael@0 | 51 | // extra assignments made by rules (<binding> tags) |
michael@0 | 52 | nsXMLBindingValues mOptionalValues; |
michael@0 | 53 | }; |
michael@0 | 54 | |
michael@0 | 55 | #endif // nsXULTemplateResultXML_h__ |