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.
1 /*
2 * Copyright 2011 The Android Open Source Project
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
8 #ifndef SKFONTCONFIGPARSER_ANDROID_H_
9 #define SKFONTCONFIGPARSER_ANDROID_H_
11 #include "SkTypes.h"
13 #include "SkPaintOptionsAndroid.h"
14 #include "SkString.h"
15 #include "SkTDArray.h"
17 struct FontFileInfo {
18 FontFileInfo() : fFileName(NULL) {}
20 const char* fFileName;
21 SkPaintOptionsAndroid fPaintOptions;
22 };
24 /**
25 * The FontFamily data structure is created during parsing and handed back to
26 * Skia to fold into its representation of font families. fNames is the list of
27 * font names that alias to a font family. fontFileArray is the list of information
28 * about each file. Order is the priority order for the font. This is
29 * used internally to determine the order in which to place fallback fonts as
30 * they are read from the configuration files.
31 */
32 struct FontFamily {
33 FontFamily() : fIsFallbackFont(false), order(-1) {}
35 SkTDArray<const char*> fNames;
36 SkTDArray<FontFileInfo*> fFontFiles;
37 bool fIsFallbackFont;
38 int order; // only used internally by SkFontConfigParser
39 };
41 namespace SkFontConfigParser {
43 /**
44 * Parses all system font configuration files and returns the results in an
45 * array of FontFamily structures.
46 */
47 void GetFontFamilies(SkTDArray<FontFamily*> &fontFamilies);
49 /**
50 * Parses all test font configuration files and returns the results in an
51 * array of FontFamily structures.
52 */
53 void GetTestFontFamilies(SkTDArray<FontFamily*> &fontFamilies,
54 const char* testMainConfigFile,
55 const char* testFallbackConfigFile);
57 SkString GetLocale();
59 } // SkFontConfigParser namespace
61 #endif /* SKFONTCONFIGPARSER_ANDROID_H_ */