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

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

Issue 2357663003: Don't use plugin-specific content settings that are from user prefs
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_utils.cc
diff --git a/chrome/browser/plugins/plugin_utils.cc b/chrome/browser/plugins/plugin_utils.cc
index bdf177b1aa6dc0a0e91940666dca568258fcbc91..3241dd6fc889e303d529d761c5a111e80eff658f 100644
--- a/chrome/browser/plugins/plugin_utils.cc
+++ b/chrome/browser/plugins/plugin_utils.cc
@@ -72,10 +72,16 @@ void GetPluginContentSettingInternal(
host_content_settings_map->GetWebsiteSetting(
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.
+ // The order of precedence is:
+ // -If a general setting was set by policy, use it.
+ // -If there is a plugin-specific setting which is not user provided (e.g.
+ // it comes from an extension or some other source), use it. We don't use
+ // user-provided plugin-specific settings because there is no longer any UI
+ // to set them.
+ // -Otherwise use the general setting.
uses_plugin_specific_setting =
specific_setting &&
+ specific_info.source != content_settings::SETTING_SOURCE_USER &&
general_info.source != content_settings::SETTING_SOURCE_POLICY;
if (uses_plugin_specific_setting) {
value = std::move(specific_setting);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698