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: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | #ifndef __UNIPRIV__ |
michael@0 | 6 | #define __UNIPRIV__ |
michael@0 | 7 | |
michael@0 | 8 | #include <stdint.h> |
michael@0 | 9 | #include "umap.h" |
michael@0 | 10 | #include "uconvutil.h" |
michael@0 | 11 | |
michael@0 | 12 | #ifdef __cplusplus |
michael@0 | 13 | extern "C" { |
michael@0 | 14 | #endif |
michael@0 | 15 | |
michael@0 | 16 | int uMapCode(const uTable *uT, |
michael@0 | 17 | uint16_t in, |
michael@0 | 18 | uint16_t* out); |
michael@0 | 19 | |
michael@0 | 20 | int uGenerate(uScanClassID scanClass, |
michael@0 | 21 | int32_t* state, |
michael@0 | 22 | uint16_t in, |
michael@0 | 23 | unsigned char* out, |
michael@0 | 24 | uint32_t outbuflen, |
michael@0 | 25 | uint32_t* outlen); |
michael@0 | 26 | |
michael@0 | 27 | int uScan(uScanClassID scanClass, |
michael@0 | 28 | int32_t *state, |
michael@0 | 29 | unsigned char *in, |
michael@0 | 30 | uint16_t *out, |
michael@0 | 31 | uint32_t inbuflen, |
michael@0 | 32 | uint32_t* inscanlen); |
michael@0 | 33 | |
michael@0 | 34 | int uGenerateShift(uShiftOutTable *shift, |
michael@0 | 35 | int32_t* state, |
michael@0 | 36 | uint16_t in, |
michael@0 | 37 | unsigned char* out, |
michael@0 | 38 | uint32_t outbuflen, |
michael@0 | 39 | uint32_t* outlen); |
michael@0 | 40 | |
michael@0 | 41 | int uScanShift(uShiftInTable *shift, |
michael@0 | 42 | int32_t *state, |
michael@0 | 43 | unsigned char *in, |
michael@0 | 44 | uint16_t *out, |
michael@0 | 45 | uint32_t inbuflen, |
michael@0 | 46 | uint32_t* inscanlen); |
michael@0 | 47 | |
michael@0 | 48 | #ifdef __cplusplus |
michael@0 | 49 | } |
michael@0 | 50 | #endif |
michael@0 | 51 | |
michael@0 | 52 | #endif /* __UNIPRIV__ */ |