Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: chrome/browser/extensions/api/settings_private/prefs_util.h

Issue 1775803002: MD Settings: add a semi-functional System page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v2-md_history
Patch Set: stevenjb@ review Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_PREFS_UTIL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_PREFS_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_PREFS_UTIL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_PREFS_UTIL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 // Success or error statuses from calling SetPref. 24 // Success or error statuses from calling SetPref.
25 enum SetPrefResult { 25 enum SetPrefResult {
26 SUCCESS, 26 SUCCESS,
27 PREF_NOT_MODIFIABLE, 27 PREF_NOT_MODIFIABLE,
28 PREF_NOT_FOUND, 28 PREF_NOT_FOUND,
29 PREF_TYPE_MISMATCH, 29 PREF_TYPE_MISMATCH,
30 PREF_TYPE_UNSUPPORTED 30 PREF_TYPE_UNSUPPORTED
31 }; 31 };
32 32
33 // TODO(dbeam): why is the key a std::string rather than const char*?
33 using TypedPrefMap = std::map<std::string, api::settings_private::PrefType>; 34 using TypedPrefMap = std::map<std::string, api::settings_private::PrefType>;
34 35
35 explicit PrefsUtil(Profile* profile); 36 explicit PrefsUtil(Profile* profile);
36 virtual ~PrefsUtil(); 37 virtual ~PrefsUtil();
37 38
38 // Gets the list of whitelisted pref keys -- that is, those which correspond 39 // Gets the list of whitelisted pref keys -- that is, those which correspond
39 // to prefs that clients of the settingsPrivate API may retrieve and 40 // to prefs that clients of the settingsPrivate API may retrieve and
40 // manipulate. 41 // manipulate.
41 const TypedPrefMap& GetWhitelistedKeys(); 42 const TypedPrefMap& GetWhitelistedKeys();
42 43
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 SetPrefResult SetCrosSettingsPref(const std::string& name, 102 SetPrefResult SetCrosSettingsPref(const std::string& name,
102 const base::Value* value); 103 const base::Value* value);
103 104
104 Profile* profile_; // weak 105 Profile* profile_; // weak
105 }; 106 };
106 107
107 } // namespace extensions 108 } // namespace extensions
108 109
109 #endif // CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_PREFS_UTIL_H_ 110 #endif // CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_PREFS_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/app/settings_strings.grdp ('k') | chrome/browser/extensions/api/settings_private/prefs_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698