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

Unified Diff: chrome/browser/ui/webui/options2/core_options_handler2.cc

Issue 10387161: Pepper Flash settings integration: add UI for "deauthorize content licenses". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes in response to Scott's suggestions Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698