summaryrefslogtreecommitdiffstats
path: root/chrome/common/pref_names_util.h
blob: d418e9bc1f92d2d2457b401ff3888a86a7bb7168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_COMMON_PREF_NAMES_UTIL_H_
#define CHROME_COMMON_PREF_NAMES_UTIL_H_

#include <string>

namespace pref_names_util {

// Extracts the generic family and script from font name pref path |pref_path|.
// For example, if |pref_path| is "webkit.webprefs.fonts.serif.Hang", returns
// true and sets |generic_family| to "serif" and |script| to "Hang".
bool ParseFontNamePrefPath(const std::string& pref_path,
                           std::string* generic_family,
                           std::string* script);

}  // namespace pref_names_util

#endif  // CHROME_COMMON_PREF_NAMES_UTIL_H_