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++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */ |
michael@0 | 2 | /* vim: set sw=4 ts=8 et tw=80 ft=cpp : */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | include protocol PBlob; |
michael@0 | 8 | include InputStreamParams; |
michael@0 | 9 | |
michael@0 | 10 | using struct mozilla::SerializedStructuredCloneBuffer from "ipc/IPCMessageUtils.h"; |
michael@0 | 11 | |
michael@0 | 12 | namespace mozilla { |
michael@0 | 13 | namespace dom { |
michael@0 | 14 | |
michael@0 | 15 | struct ClonedMessageData |
michael@0 | 16 | { |
michael@0 | 17 | SerializedStructuredCloneBuffer data; |
michael@0 | 18 | PBlob[] blobs; |
michael@0 | 19 | }; |
michael@0 | 20 | |
michael@0 | 21 | struct NormalBlobConstructorParams |
michael@0 | 22 | { |
michael@0 | 23 | nsString contentType; |
michael@0 | 24 | uint64_t length; |
michael@0 | 25 | }; |
michael@0 | 26 | |
michael@0 | 27 | struct FileBlobConstructorParams |
michael@0 | 28 | { |
michael@0 | 29 | nsString name; |
michael@0 | 30 | nsString contentType; |
michael@0 | 31 | uint64_t length; |
michael@0 | 32 | uint64_t modDate; |
michael@0 | 33 | }; |
michael@0 | 34 | |
michael@0 | 35 | struct SlicedBlobConstructorParams |
michael@0 | 36 | { |
michael@0 | 37 | PBlob source; |
michael@0 | 38 | uint64_t begin; |
michael@0 | 39 | uint64_t end; |
michael@0 | 40 | nsString contentType; |
michael@0 | 41 | }; |
michael@0 | 42 | |
michael@0 | 43 | struct MysteryBlobConstructorParams |
michael@0 | 44 | { |
michael@0 | 45 | // Nothing is known about this type of blob. |
michael@0 | 46 | }; |
michael@0 | 47 | |
michael@0 | 48 | union ChildBlobConstructorParams |
michael@0 | 49 | { |
michael@0 | 50 | NormalBlobConstructorParams; |
michael@0 | 51 | FileBlobConstructorParams; |
michael@0 | 52 | SlicedBlobConstructorParams; |
michael@0 | 53 | MysteryBlobConstructorParams; |
michael@0 | 54 | }; |
michael@0 | 55 | |
michael@0 | 56 | struct ParentBlobConstructorParams |
michael@0 | 57 | { |
michael@0 | 58 | ChildBlobConstructorParams blobParams; |
michael@0 | 59 | OptionalInputStreamParams optionalInputStreamParams; |
michael@0 | 60 | }; |
michael@0 | 61 | |
michael@0 | 62 | union BlobConstructorParams |
michael@0 | 63 | { |
michael@0 | 64 | ChildBlobConstructorParams; |
michael@0 | 65 | ParentBlobConstructorParams; |
michael@0 | 66 | }; |
michael@0 | 67 | |
michael@0 | 68 | } // namespace dom |
michael@0 | 69 | } // namespace mozilla |