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 nsXULTemplateQueryProcessorStorage_h__
7 #define nsXULTemplateQueryProcessorStorage_h__
9 #include "nsIXULTemplateBuilder.h"
10 #include "nsIXULTemplateQueryProcessor.h"
12 #include "nsISimpleEnumerator.h"
13 #include "nsCOMArray.h"
14 #include "nsIVariant.h"
16 #include "mozIStorageValueArray.h"
17 #include "mozIStorageStatement.h"
18 #include "mozIStorageConnection.h"
19 #include "mozilla/Attributes.h"
21 class nsXULTemplateQueryProcessorStorage;
23 class nsXULTemplateResultSetStorage MOZ_FINAL : public nsISimpleEnumerator
24 {
25 private:
27 nsCOMPtr<mozIStorageStatement> mStatement;
29 nsCOMArray<nsIAtom> mColumnNames;
31 public:
33 // nsISupports interface
34 NS_DECL_ISUPPORTS
36 // nsISimpleEnumerator interface
37 NS_DECL_NSISIMPLEENUMERATOR
39 nsXULTemplateResultSetStorage(mozIStorageStatement* aStatement);
41 int32_t GetColumnIndex(nsIAtom* aColumnName);
43 void FillColumnValues(nsCOMArray<nsIVariant>& aArray);
45 };
47 class nsXULTemplateQueryProcessorStorage MOZ_FINAL : public nsIXULTemplateQueryProcessor
48 {
49 public:
51 nsXULTemplateQueryProcessorStorage();
53 // nsISupports interface
54 NS_DECL_ISUPPORTS
56 // nsIXULTemplateQueryProcessor interface
57 NS_DECL_NSIXULTEMPLATEQUERYPROCESSOR
59 private:
61 nsCOMPtr<mozIStorageConnection> mStorageConnection;
62 bool mGenerationStarted;
63 };
65 #endif // nsXULTemplateQueryProcessorStorage_h__