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 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | include "mozilla/dom/indexedDB/SerializationHelpers.h"; |
michael@0 | 6 | |
michael@0 | 7 | using class mozilla::dom::indexedDB::Key from "mozilla/dom/indexedDB/Key.h"; |
michael@0 | 8 | using mozilla::dom::indexedDB::IDBCursor::Direction from "mozilla/dom/indexedDB/IDBCursor.h"; |
michael@0 | 9 | using struct mozilla::dom::indexedDB::SerializedStructuredCloneReadInfo from "mozilla/dom/indexedDB/IndexedDatabase.h"; |
michael@0 | 10 | |
michael@0 | 11 | using struct mozilla::void_t from "ipc/IPCMessageUtils.h"; |
michael@0 | 12 | |
michael@0 | 13 | namespace mozilla { |
michael@0 | 14 | namespace dom { |
michael@0 | 15 | namespace indexedDB { |
michael@0 | 16 | namespace ipc { |
michael@0 | 17 | |
michael@0 | 18 | struct KeyRange |
michael@0 | 19 | { |
michael@0 | 20 | Key lower; |
michael@0 | 21 | Key upper; |
michael@0 | 22 | bool lowerOpen; |
michael@0 | 23 | bool upperOpen; |
michael@0 | 24 | bool isOnly; |
michael@0 | 25 | }; |
michael@0 | 26 | |
michael@0 | 27 | union OptionalKeyRange |
michael@0 | 28 | { |
michael@0 | 29 | KeyRange; |
michael@0 | 30 | void_t; |
michael@0 | 31 | }; |
michael@0 | 32 | |
michael@0 | 33 | struct GetParams |
michael@0 | 34 | { |
michael@0 | 35 | KeyRange keyRange; |
michael@0 | 36 | }; |
michael@0 | 37 | |
michael@0 | 38 | struct GetAllParams |
michael@0 | 39 | { |
michael@0 | 40 | OptionalKeyRange optionalKeyRange; |
michael@0 | 41 | uint32_t limit; |
michael@0 | 42 | }; |
michael@0 | 43 | |
michael@0 | 44 | struct GetAllKeysParams |
michael@0 | 45 | { |
michael@0 | 46 | OptionalKeyRange optionalKeyRange; |
michael@0 | 47 | uint32_t limit; |
michael@0 | 48 | }; |
michael@0 | 49 | |
michael@0 | 50 | struct CountParams |
michael@0 | 51 | { |
michael@0 | 52 | OptionalKeyRange optionalKeyRange; |
michael@0 | 53 | }; |
michael@0 | 54 | |
michael@0 | 55 | struct OpenCursorParams |
michael@0 | 56 | { |
michael@0 | 57 | OptionalKeyRange optionalKeyRange; |
michael@0 | 58 | Direction direction; |
michael@0 | 59 | }; |
michael@0 | 60 | |
michael@0 | 61 | struct OpenKeyCursorParams |
michael@0 | 62 | { |
michael@0 | 63 | OptionalKeyRange optionalKeyRange; |
michael@0 | 64 | Direction direction; |
michael@0 | 65 | }; |
michael@0 | 66 | |
michael@0 | 67 | union OptionalStructuredCloneReadInfo |
michael@0 | 68 | { |
michael@0 | 69 | SerializedStructuredCloneReadInfo; |
michael@0 | 70 | void_t; |
michael@0 | 71 | }; |
michael@0 | 72 | |
michael@0 | 73 | } // namespace ipc |
michael@0 | 74 | } // namespace indexedDB |
michael@0 | 75 | } // namespace dom |
michael@0 | 76 | } // namespace mozilla |