Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 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_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_PREFS_UTIL_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_PREFS_UTIL_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "chrome/common/extensions/api/settings_private.h" | |
| 14 | |
| 15 class PrefService; | |
| 16 class Profile; | |
| 17 | |
| 18 namespace extensions { | |
| 19 | |
| 20 namespace prefs_util { | |
| 21 | |
| 22 using TypedPrefMap = std::map<std::string, api::settings_private::PrefType>; | |
| 23 | |
| 24 const TypedPrefMap& GetWhitelistedKeys(); | |
|
stevenjb
2015/04/06 22:40:59
All of these functions should have comments.
Oren Blasberg
2015/04/06 23:27:06
Done.
| |
| 25 | |
| 26 // Gets the value of the pref with the given |name|. | |
|
stevenjb
2015/04/06 22:40:59
Describe behavior if |name| is not found. (i.e. Re
Oren Blasberg
2015/04/06 23:27:06
Done.
| |
| 27 scoped_ptr<api::settings_private::PrefObject> GetPref(Profile* profile, | |
| 28 const std::string& name); | |
| 29 | |
| 30 bool IsPrefTypeURL(const std::string& pref_name); | |
| 31 | |
| 32 bool IsPrefUserModifiable(Profile* profile, const std::string& pref_name); | |
| 33 | |
| 34 PrefService* FindServiceForPref(Profile* profile, const std::string& pref_name); | |
| 35 | |
| 36 } // namespace prefs_util | |
| 37 | |
| 38 } // namespace extensions | |
| 39 | |
| 40 #endif // CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_PREFS_UTIL_H_ | |
| OLD | NEW |