Chromium Code Reviews| Index: chrome/browser/ui/webui/options/core_options_handler.cc |
| diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc |
| index b7bc0ff5911135a5a7df5a61a06a23ef223e4046..91fd9afe5b8b236c6c4a81e0ae6ac41c803e0655 100644 |
| --- a/chrome/browser/ui/webui/options/core_options_handler.cc |
| +++ b/chrome/browser/ui/webui/options/core_options_handler.cc |
| @@ -92,6 +92,12 @@ void CoreOptionsHandler::InitializeHandler() { |
| pref_change_filters_[prefs::kMetricsReportingEnabled] = |
| base::Bind(&AllowMetricsReportingChange); |
| + pref_change_filters_[prefs::kBrowserGuestModeEnabled] = |
| + base::Bind(&CoreOptionsHandler::AllowedByUnsupervisedUserOnly, |
| + base::Unretained(this)); |
| + pref_change_filters_[prefs::kBrowserAddPersonEnabled] = |
| + base::Bind(&CoreOptionsHandler::AllowedByUnsupervisedUserOnly, |
| + base::Unretained(this)); |
| } |
| void CoreOptionsHandler::InitializePage() { |
| @@ -657,4 +663,9 @@ void CoreOptionsHandler::UpdatePepperFlashSettingsEnabled() { |
| "OptionsPage.setPepperFlashSettingsEnabled", enabled); |
| } |
| +bool CoreOptionsHandler::AllowedByUnsupervisedUserOnly( |
|
Evan Stade
2014/09/02 18:18:18
can you just name this "IsUserUnsupervised"
Mike Lerman
2014/09/04 14:37:08
Done.
|
| + const base::Value* to_value) { |
| + return !Profile::FromWebUI(web_ui())->IsSupervised(); |
| +} |
| + |
| } // namespace options |