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

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
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..2f4c014e6a03c0ea001c23df28d87e0500c0a9c6 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -22,6 +22,7 @@
#include "components/content_settings/core/browser/content_settings_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
+#include "components/plugins/common/plugins_field_trial.h"
#include "components/rappor/rappor_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/plugin_service.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;

Powered by Google App Engine
This is Rietveld 408576698