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.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsXULTemplateResultSetRDF_h__
7 #define nsXULTemplateResultSetRDF_h__
9 #include "nsISimpleEnumerator.h"
10 #include "nsRuleNetwork.h"
11 #include "nsRDFQuery.h"
12 #include "nsXULTemplateResultRDF.h"
13 #include "mozilla/Attributes.h"
15 class nsXULTemplateQueryProcessorRDF;
16 class nsXULTemplateResultRDF;
18 /**
19 * An enumerator used to iterate over a set of results.
20 */
21 class nsXULTemplateResultSetRDF MOZ_FINAL : public nsISimpleEnumerator
22 {
23 private:
24 nsXULTemplateQueryProcessorRDF* mProcessor;
26 nsRDFQuery* mQuery;
28 const InstantiationSet* mInstantiations;
30 nsCOMPtr<nsIRDFResource> mResource;
32 InstantiationSet::List *mCurrent;
34 bool mCheckedNext;
36 public:
38 // nsISupports interface
39 NS_DECL_ISUPPORTS
41 // nsISimpleEnumerator interface
42 NS_DECL_NSISIMPLEENUMERATOR
44 nsXULTemplateResultSetRDF(nsXULTemplateQueryProcessorRDF *aProcessor,
45 nsRDFQuery* aQuery,
46 const InstantiationSet* aInstantiations)
47 : mProcessor(aProcessor),
48 mQuery(aQuery),
49 mInstantiations(aInstantiations),
50 mCurrent(nullptr),
51 mCheckedNext(false)
52 { }
54 ~nsXULTemplateResultSetRDF()
55 {
56 delete mInstantiations;
57 }
58 };
60 #endif // nsXULTemplateResultSetRDF_h__