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 2006 The Android Open Source Project
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
10 #ifndef SkBML_WXMLParser_DEFINED
11 #define SkBML_WXMLParser_DEFINED
13 #include "SkString.h"
14 #include "SkXMLParser.h"
16 class SkStream;
17 class SkWStream;
19 class BML_WXMLParser : public SkXMLParser {
20 public:
21 BML_WXMLParser(SkWStream& writer);
22 virtual ~BML_WXMLParser();
23 static void Write(SkStream& s, const char filename[]);
25 /** @cond UNIT_TEST */
26 SkDEBUGCODE(static void UnitTest();)
27 /** @endcond */
28 private:
29 virtual bool onAddAttribute(const char name[], const char value[]);
30 virtual bool onEndElement(const char name[]);
31 virtual bool onStartElement(const char name[]);
32 BML_WXMLParser& operator=(const BML_WXMLParser& src);
33 #ifdef SK_DEBUG
34 int fElemsCount, fElemsReused;
35 int fAttrsCount, fNamesReused, fValuesReused;
36 #endif
37 SkWStream& fWriter;
38 char* fElems[256];
39 char* fAttrNames[256];
40 char* fAttrValues[256];
42 // important that these are U8, so we get automatic wrap-around
43 U8 fNextElem, fNextAttrName, fNextAttrValue;
44 };
46 #endif // SkBML_WXMLParser_DEFINED