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

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

Issue 1033103002: Plugin Power Saver: Overhaul plugin-power-saver flags. Show in UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « chrome/browser/about_flags.cc ('k') | chrome/browser/plugins/plugins_field_trial.h » ('j') | 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 bb2c2cd0c72dbe20f27134ae996ba06bee85e508..311cc5bc689e387847329cd7faaac51634e5a675 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/plugins/plugin_finder.h"
#include "chrome/browser/plugins/plugin_metadata.h"
#include "chrome/browser/plugins/plugin_prefs.h"
+#include "chrome/browser/plugins/plugins_field_trial.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_otr_state.h"
#include "chrome/common/pref_names.h"
@@ -356,7 +357,12 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
GetPluginContentSetting(plugin, params.top_origin_url, params.url,
plugin_metadata->identifier(), &plugin_setting,
&uses_default_content_setting, &is_managed);
+
+ plugin_setting = PluginsFieldTrial::EffectiveContentSetting(
+ CONTENT_SETTINGS_TYPE_PLUGINS, plugin_setting);
+
DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT);
+ DCHECK(plugin_setting != CONTENT_SETTING_ASK);
PluginMetadata::SecurityStatus plugin_status =
plugin_metadata->GetSecurityStatus(plugin);
@@ -419,8 +425,7 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
if (plugin_setting == CONTENT_SETTING_DETECT_IMPORTANT_CONTENT) {
status->value =
ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent;
- } else if (plugin_setting == CONTENT_SETTING_BLOCK ||
- plugin_setting == CONTENT_SETTING_ASK) {
+ } else if (plugin_setting == CONTENT_SETTING_BLOCK) {
status->value =
is_managed ? ChromeViewHostMsg_GetPluginInfo_Status::kBlockedByPolicy
: ChromeViewHostMsg_GetPluginInfo_Status::kBlocked;
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/plugins/plugins_field_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698