OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // is an array that contains a single item, the name of the metric identifier. | 156 // is an array that contains a single item, the name of the metric identifier. |
157 void HandleUserMetricsAction(const base::ListValue* args); | 157 void HandleUserMetricsAction(const base::ListValue* args); |
158 | 158 |
159 // Callback for the "disableExtension" message. The extension ID string is the | 159 // Callback for the "disableExtension" message. The extension ID string is the |
160 // only argument in the |args| list. | 160 // only argument in the |args| list. |
161 void HandleDisableExtension(const base::ListValue* args); | 161 void HandleDisableExtension(const base::ListValue* args); |
162 | 162 |
163 void UpdateClearPluginLSOData(); | 163 void UpdateClearPluginLSOData(); |
164 void UpdatePepperFlashSettingsEnabled(); | 164 void UpdatePepperFlashSettingsEnabled(); |
165 | 165 |
| 166 // Checks that the current profile is not supervised. Used as a pref filter. |
| 167 bool IsUserUnsupervised(const base::Value* to_value); |
| 168 |
166 OptionsPageUIHandlerHost* handlers_host_; | 169 OptionsPageUIHandlerHost* handlers_host_; |
167 // This registrar keeps track of user prefs. | 170 // This registrar keeps track of user prefs. |
168 PrefChangeRegistrar registrar_; | 171 PrefChangeRegistrar registrar_; |
169 // This registrar keeps track of local state. | 172 // This registrar keeps track of local state. |
170 PrefChangeRegistrar local_state_registrar_; | 173 PrefChangeRegistrar local_state_registrar_; |
171 | 174 |
172 PluginStatusPrefSetter plugin_status_pref_setter_; | 175 PluginStatusPrefSetter plugin_status_pref_setter_; |
173 | 176 |
174 // This maps pref names to filter functions. The callbacks should take the | 177 // This maps pref names to filter functions. The callbacks should take the |
175 // value that the user has attempted to set for the pref, and should return | 178 // value that the user has attempted to set for the pref, and should return |
176 // true if that value may be applied. If the return value is false, the | 179 // true if that value may be applied. If the return value is false, the |
177 // change will be ignored. | 180 // change will be ignored. |
178 typedef std::map<std::string, base::Callback<bool(const base::Value*)> > | 181 typedef std::map<std::string, base::Callback<bool(const base::Value*)> > |
179 PrefChangeFilterMap; | 182 PrefChangeFilterMap; |
180 PrefChangeFilterMap pref_change_filters_; | 183 PrefChangeFilterMap pref_change_filters_; |
181 | 184 |
182 DISALLOW_COPY_AND_ASSIGN(CoreOptionsHandler); | 185 DISALLOW_COPY_AND_ASSIGN(CoreOptionsHandler); |
183 }; | 186 }; |
184 | 187 |
185 } // namespace options | 188 } // namespace options |
186 | 189 |
187 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ | 190 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ |
OLD | NEW |