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

Unified Diff: chrome/browser/plugins/plugins_field_trial.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
Index: chrome/browser/plugins/plugins_field_trial.cc
diff --git a/chrome/browser/plugins/plugins_field_trial.cc b/chrome/browser/plugins/plugins_field_trial.cc
index a84a9cd809d4037da7855449338f9a24b192bcc4..f7793a589711dcf945ab1adaf9b382884e751186 100644
--- a/chrome/browser/plugins/plugins_field_trial.cc
+++ b/chrome/browser/plugins/plugins_field_trial.cc
@@ -6,6 +6,7 @@
#include "base/feature_list.h"
#include "base/strings/string_number_conversions.h"
+#include "chrome/browser/plugins/plugin_utils.h"
#include "chrome/common/chrome_features.h"
#include "components/variations/variations_associated_data.h"
@@ -24,6 +25,7 @@ const char* PluginsFieldTrial::kSiteEngagementThresholdForFlashKey =
// static
ContentSetting PluginsFieldTrial::EffectiveContentSetting(
+ const HostContentSettingsMap* host_content_settings_map,
ContentSettingsType type,
ContentSetting setting) {
if (type != CONTENT_SETTINGS_TYPE_PLUGINS ||
@@ -33,7 +35,7 @@ ContentSetting PluginsFieldTrial::EffectiveContentSetting(
// For Plugins, ASK is obsolete. Show as BLOCK or, if PreferHtmlOverPlugins
// feature is enabled, as DETECT_IMPORTANT_CONTENT to reflect actual behavior.
- return base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins)
+ return PluginUtils::ShouldPreferHtmlOverPlugins(host_content_settings_map)
? ContentSetting::CONTENT_SETTING_DETECT_IMPORTANT_CONTENT
: ContentSetting::CONTENT_SETTING_BLOCK;
}
« no previous file with comments | « chrome/browser/plugins/plugins_field_trial.h ('k') | chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698