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

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

Issue 2408613002: Replace kPreferHtmlOverPlugins feature checks with PluginUtils::ShouldPreferHtmlOverPlugi… (Closed)
Patch Set: Replace remaining kPreferHtmlOverPlugins feature checks with PluginUtils::ShouldPreferHtmlOverPlugi… Created 4 years, 2 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/plugins/flash_permission_context.cc ('k') | chrome/browser/plugins/plugin_utils.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 c1043375281defa789561245fa3d9432502ae97b..5ae1ef656604b21d7807ca974643d553e6b7c03f 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -325,7 +325,8 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
// TODO(tommycli): Remove once we deprecate the plugin ASK policy.
bool legacy_ask_user = plugin_setting == CONTENT_SETTING_ASK;
plugin_setting = PluginsFieldTrial::EffectiveContentSetting(
- CONTENT_SETTINGS_TYPE_PLUGINS, plugin_setting);
+ host_content_settings_map_, CONTENT_SETTINGS_TYPE_PLUGINS,
+ plugin_setting);
DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT);
DCHECK(plugin_setting != CONTENT_SETTING_ASK);
@@ -366,7 +367,7 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
if (plugin_setting == CONTENT_SETTING_DETECT_IMPORTANT_CONTENT ||
(plugin_setting == CONTENT_SETTING_ALLOW &&
- base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins) &&
+ PluginUtils::ShouldPreferHtmlOverPlugins(host_content_settings_map_) &&
!base::FeatureList::IsEnabled(features::kRunAllFlashInAllowMode))) {
*status = ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent;
} else if (plugin_setting == CONTENT_SETTING_BLOCK) {
@@ -444,7 +445,7 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
i = 0;
*status = ChromeViewHostMsg_GetPluginInfo_Status::kDisabled;
- if (base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins) &&
+ if (PluginUtils::ShouldPreferHtmlOverPlugins(host_content_settings_map_) &&
matching_plugins[0].name ==
base::ASCIIToUTF16(content::kFlashPluginName)) {
// TODO(tommycli): This assumes that Flash can no longer be disabled
« no previous file with comments | « chrome/browser/plugins/flash_permission_context.cc ('k') | chrome/browser/plugins/plugin_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698