Index: chrome/browser/ui/website_settings/website_settings_ui.cc |
diff --git a/chrome/browser/ui/website_settings/website_settings_ui.cc b/chrome/browser/ui/website_settings/website_settings_ui.cc |
index 210b5f5a17045f2146dca74d6e18a6e98578982d..2d9b91e24fd8720ad21a25e3cd10405455ce55b9 100644 |
--- a/chrome/browser/ui/website_settings/website_settings_ui.cc |
+++ b/chrome/browser/ui/website_settings/website_settings_ui.cc |
@@ -6,6 +6,7 @@ |
#include "chrome/grit/chromium_strings.h" |
#include "chrome/grit/generated_resources.h" |
+#include "components/plugins/common/plugins_field_trial.h" |
#include "grit/theme_resources.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/resource/resource_bundle.h" |
@@ -179,11 +180,19 @@ base::string16 WebsiteSettingsUI::PermissionActionToUIString( |
if (effective_setting == CONTENT_SETTING_DEFAULT) { |
effective_setting = default_setting; |
+#if defined(ENABLE_PLUGINS) |
+ // For Plugins, allow flag to override displayed content setting. |
// For Plugins, ASK is obsolete. Show as BLOCK to reflect actual behavior. |
- if (type == CONTENT_SETTINGS_TYPE_PLUGINS && |
- default_setting == CONTENT_SETTING_ASK) { |
- effective_setting = CONTENT_SETTING_BLOCK; |
+ if (type == CONTENT_SETTINGS_TYPE_PLUGINS) { |
+ if (default_setting == ContentSetting::CONTENT_SETTING_ALLOW && |
+ PluginsFieldTrial::EnableForcePluginPowerSaver()) { |
+ effective_setting = |
+ ContentSetting::CONTENT_SETTING_DETECT_IMPORTANT_CONTENT; |
+ } else if (default_setting == CONTENT_SETTING_ASK) { |
+ effective_setting = CONTENT_SETTING_BLOCK; |
+ } |
} |
+#endif // defined(ENABLE_PLUGINS) |
} |
const int* button_text_ids = NULL; |