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: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | * |
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 | /* local header for xpconnect tests components */ |
michael@0 | 8 | |
michael@0 | 9 | #ifndef xpctest_private_h___ |
michael@0 | 10 | #define xpctest_private_h___ |
michael@0 | 11 | |
michael@0 | 12 | #include "nsISupports.h" |
michael@0 | 13 | #include "nsMemory.h" |
michael@0 | 14 | #include "nsStringGlue.h" |
michael@0 | 15 | #include "xpctest_attributes.h" |
michael@0 | 16 | #include "xpctest_params.h" |
michael@0 | 17 | #include "mozilla/Attributes.h" |
michael@0 | 18 | |
michael@0 | 19 | class xpcTestObjectReadOnly MOZ_FINAL : public nsIXPCTestObjectReadOnly { |
michael@0 | 20 | public: |
michael@0 | 21 | NS_DECL_ISUPPORTS |
michael@0 | 22 | NS_DECL_NSIXPCTESTOBJECTREADONLY |
michael@0 | 23 | xpcTestObjectReadOnly(); |
michael@0 | 24 | |
michael@0 | 25 | private: |
michael@0 | 26 | bool boolProperty; |
michael@0 | 27 | int16_t shortProperty; |
michael@0 | 28 | int32_t longProperty; |
michael@0 | 29 | float floatProperty; |
michael@0 | 30 | char charProperty; |
michael@0 | 31 | PRTime timeProperty; |
michael@0 | 32 | }; |
michael@0 | 33 | |
michael@0 | 34 | class xpcTestObjectReadWrite MOZ_FINAL : public nsIXPCTestObjectReadWrite { |
michael@0 | 35 | public: |
michael@0 | 36 | NS_DECL_ISUPPORTS |
michael@0 | 37 | NS_DECL_NSIXPCTESTOBJECTREADWRITE |
michael@0 | 38 | |
michael@0 | 39 | xpcTestObjectReadWrite(); |
michael@0 | 40 | ~xpcTestObjectReadWrite(); |
michael@0 | 41 | |
michael@0 | 42 | private: |
michael@0 | 43 | bool boolProperty; |
michael@0 | 44 | int16_t shortProperty; |
michael@0 | 45 | int32_t longProperty; |
michael@0 | 46 | float floatProperty; |
michael@0 | 47 | char charProperty; |
michael@0 | 48 | char *stringProperty; |
michael@0 | 49 | PRTime timeProperty; |
michael@0 | 50 | }; |
michael@0 | 51 | |
michael@0 | 52 | class nsXPCTestParams MOZ_FINAL : public nsIXPCTestParams |
michael@0 | 53 | { |
michael@0 | 54 | public: |
michael@0 | 55 | NS_DECL_ISUPPORTS |
michael@0 | 56 | NS_DECL_NSIXPCTESTPARAMS |
michael@0 | 57 | |
michael@0 | 58 | nsXPCTestParams(); |
michael@0 | 59 | |
michael@0 | 60 | private: |
michael@0 | 61 | ~nsXPCTestParams(); |
michael@0 | 62 | }; |
michael@0 | 63 | |
michael@0 | 64 | #endif /* xpctest_private_h___ */ |