gfx/skia/trunk/include/xml/SkBML_WXMLParser.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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

mercurial