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

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

Issue 1137073006: Plugin Power Saver: Fix PDF interaction with Enterprise ASK policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix an error in the code (tests caught it) Created 5 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
« 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_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 952a1dd610e4b47dea8bf5d2102b9bb595622fa4..72e09c4f44a1658a57b18090571eb37b7c7cefd5 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -377,6 +377,7 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
plugin_metadata->identifier(), &plugin_setting,
&uses_default_content_setting, &is_managed);
+ // TODO(tommycli): Remove once we deprecate the plugin ASK policy.
bool legacy_ask_user = plugin_setting == CONTENT_SETTING_ASK;
plugin_setting = content_settings::PluginsFieldTrial::EffectiveContentSetting(
CONTENT_SETTINGS_TYPE_PLUGINS, plugin_setting);
@@ -568,8 +569,13 @@ void PluginInfoMessageFilter::Context::GetPluginContentSetting(
// If there is a plugin-specific setting, we use it, unless the general
// setting was set by policy, in which case it takes precedence.
- uses_plugin_specific_setting = specific_setting &&
- (general_info.source != content_settings::SETTING_SOURCE_POLICY);
+ // TODO(tommycli): Remove once we deprecate the plugin ASK policy.
+ bool legacy_ask_user = content_settings::ValueToContentSetting(
+ general_setting.get()) == CONTENT_SETTING_ASK;
+ bool use_policy =
+ general_info.source == content_settings::SETTING_SOURCE_POLICY &&
+ !legacy_ask_user;
+ uses_plugin_specific_setting = specific_setting && !use_policy;
if (uses_plugin_specific_setting) {
value = specific_setting.Pass();
info = specific_info;
« 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