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.
2 /*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8 #ifndef SkStream_NSData_DEFINED
9 #define SkStream_NSData_DEFINED
11 #import <UIKit/UIKit.h>
12 #include "SkStream.h"
14 /** Returns an NSData with a copy of the stream's data. The caller must call
15 retain if it intends to keep the data object beyond the current stack-frame
16 (i.e. internally we're calling [NSData dataWithBytes...]
17 */
18 NSData* NSData_dataWithStream(SkStream* stream);
20 /** Returns an NSData from the named resource (from main bundle).
21 The caller must call retain if it intends to keep the data object beyond
22 the current stack-frame
23 (i.e. internally we're calling [NSData dataWithContentsOfMappedFile...]
24 */
25 NSData* NSData_dataFromResource(const char name[], const char suffix[]);
27 /** Wrap a stream around NSData.
28 */
29 class SkStream_NSData : public SkMemoryStream {
30 public:
31 SkStream_NSData(NSData* data);
32 virtual ~SkStream_NSData();
34 static SkStream_NSData* CreateFromResource(const char name[],
35 const char suffix[]);
37 private:
38 NSData* fNSData;
39 };
41 #endif