| Index: chrome/browser/ui/webui/options2/core_options_handler2.cc
|
| diff --git a/chrome/browser/ui/webui/options2/core_options_handler2.cc b/chrome/browser/ui/webui/options2/core_options_handler2.cc
|
| index db4a720fc24919882aaba17db533e4c35dcf521e..3911e758f91a623d47fdeef1f6aea9dd3d5888f5 100644
|
| --- a/chrome/browser/ui/webui/options2/core_options_handler2.cc
|
| +++ b/chrome/browser/ui/webui/options2/core_options_handler2.cc
|
| @@ -40,13 +40,12 @@ CoreOptionsHandler::CoreOptionsHandler()
|
| CoreOptionsHandler::~CoreOptionsHandler() {}
|
|
|
| void CoreOptionsHandler::InitializeHandler() {
|
| - clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled,
|
| - Profile::FromWebUI(web_ui()),
|
| - this);
|
| + plugin_status_pref_setter_.Init(Profile::FromWebUI(web_ui()), this);
|
| }
|
|
|
| void CoreOptionsHandler::InitializePage() {
|
| UpdateClearPluginLSOData();
|
| + UpdatePepperFlashSettingsEnabled();
|
| }
|
|
|
| void CoreOptionsHandler::GetLocalizedValues(
|
| @@ -127,6 +126,10 @@ void CoreOptionsHandler::Observe(int type,
|
| UpdateClearPluginLSOData();
|
| return;
|
| }
|
| + if (*pref_name == prefs::kPepperFlashSettingsEnabled) {
|
| + UpdatePepperFlashSettingsEnabled();
|
| + return;
|
| + }
|
| NotifyPrefChanged(*pref_name, std::string());
|
| }
|
| }
|
| @@ -464,9 +467,17 @@ void CoreOptionsHandler::HandleUserMetricsAction(const ListValue* args) {
|
| void CoreOptionsHandler::UpdateClearPluginLSOData() {
|
| scoped_ptr<base::Value> enabled(
|
| base::Value::CreateBooleanValue(
|
| - clear_plugin_lso_data_enabled_.GetValue()));
|
| + plugin_status_pref_setter_.IsClearPluginLSODataEnabled()));
|
| web_ui()->CallJavascriptFunction(
|
| "OptionsPage.setClearPluginLSODataEnabled", *enabled);
|
| }
|
|
|
| +void CoreOptionsHandler::UpdatePepperFlashSettingsEnabled() {
|
| + scoped_ptr<base::Value> enabled(
|
| + base::Value::CreateBooleanValue(
|
| + plugin_status_pref_setter_.IsPepperFlashSettingsEnabled()));
|
| + web_ui()->CallJavascriptFunction(
|
| + "OptionsPage.setPepperFlashSettingsEnabled", *enabled);
|
| +}
|
| +
|
| } // namespace options2
|
|
|