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

Unified Diff: chrome/browser/plugins/plugin_info_message_filter.cc

Issue 542253003: Add a global on/off switch for content settings and expose a toggle on the Website Settings options… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@global-settings
Patch Set: Rebase. Created 6 years, 3 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/plugins/plugin_info_message_filter.cc
diff --git a/chrome/browser/plugins/plugin_info_message_filter.cc b/chrome/browser/plugins/plugin_info_message_filter.cc
index 090a5df1dc43375fdfbfcaf8446c77d41024e22d..d5b4ab33e31ee73e0ff6b18fd23dbff457ed9220 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -400,21 +400,29 @@ void PluginInfoMessageFilter::Context::GetPluginContentSetting(
content_settings::SettingInfo info;
bool uses_plugin_specific_setting = false;
if (ShouldUseJavaScriptSettingForPlugin(plugin)) {
- value.reset(
- host_content_settings_map_->GetWebsiteSetting(
- policy_url, policy_url, CONTENT_SETTINGS_TYPE_JAVASCRIPT,
- std::string(), &info));
+ value = host_content_settings_map_->GetWebsiteSetting(
+ policy_url,
+ policy_url,
+ CONTENT_SETTINGS_TYPE_JAVASCRIPT,
+ std::string(),
+ &info);
} else {
content_settings::SettingInfo specific_info;
- scoped_ptr<base::Value> specific_setting(
+ scoped_ptr<base::Value> specific_setting =
host_content_settings_map_->GetWebsiteSetting(
- policy_url, plugin_url, CONTENT_SETTINGS_TYPE_PLUGINS, resource,
- &specific_info));
+ policy_url,
+ plugin_url,
+ CONTENT_SETTINGS_TYPE_PLUGINS,
+ resource,
+ &specific_info);
content_settings::SettingInfo general_info;
- scoped_ptr<base::Value> general_setting(
+ scoped_ptr<base::Value> general_setting =
host_content_settings_map_->GetWebsiteSetting(
- policy_url, plugin_url, CONTENT_SETTINGS_TYPE_PLUGINS,
- std::string(), &general_info));
+ policy_url,
+ plugin_url,
+ CONTENT_SETTINGS_TYPE_PLUGINS,
+ std::string(),
+ &general_info);
// If there is a plugin-specific setting, we use it, unless the general
// setting was set by policy, in which case it takes precedence.

Powered by Google App Engine
This is Rietveld 408576698