Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | be85e7d | 2012-10-31 08:34:20 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_COMMON_PREF_NAMES_UTIL_H_ |
| 6 | #define CHROME_COMMON_PREF_NAMES_UTIL_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | namespace pref_names_util { |
| 11 | |
Brett Wilson | 21cf626a | 2017-09-07 00:30:20 | [diff] [blame] | 12 | // Prefs prefix for all font types. Ends in a period. |
| 13 | extern const char kWebKitFontPrefPrefix[]; |
| 14 | |
[email protected] | be85e7d | 2012-10-31 08:34:20 | [diff] [blame] | 15 | // Extracts the generic family and script from font name pref path |pref_path|. |
| 16 | // For example, if |pref_path| is "webkit.webprefs.fonts.serif.Hang", returns |
| 17 | // true and sets |generic_family| to "serif" and |script| to "Hang". |
| 18 | bool ParseFontNamePrefPath(const std::string& pref_path, |
| 19 | std::string* generic_family, |
| 20 | std::string* script); |
| 21 | |
[email protected] | be85e7d | 2012-10-31 08:34:20 | [diff] [blame] | 22 | } // namespace pref_names_util |
| 23 | |
| 24 | #endif // CHROME_COMMON_PREF_NAMES_UTIL_H_ |