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

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

Issue 2154603003: [HBD] Don't advertise flash if PreferHtmlOverPlugins feature is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change constant used Created 4 years, 5 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 | « no previous file | chrome/common/chrome_features.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/chrome_plugin_service_filter.cc
diff --git a/chrome/browser/plugins/chrome_plugin_service_filter.cc b/chrome/browser/plugins/chrome_plugin_service_filter.cc
index e815629fc14351c8d7de056473ca9d53db05a109..f6d648e8669c25f7a6411bb35dc1169858f312f3 100644
--- a/chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ b/chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/plugins/plugin_metadata.h"
#include "chrome/browser/plugins/plugin_prefs.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/render_messages.h"
#include "chrome/grit/generated_resources.h"
#include "components/content_settings/content/common/content_settings_messages.h"
@@ -30,6 +31,7 @@
#include "content/public/browser/resource_context.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/content_constants.h"
#include "grit/components_strings.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -104,6 +106,12 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
}
}
+ // Check whether PreferHtmlOverPlugins feature is enabled.
+ if (plugin->name == base::ASCIIToUTF16(content::kFlashPluginName) &&
+ base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins)) {
+ return false;
+ }
+
// Check whether the plugin is disabled.
ResourceContextMap::iterator prefs_it =
resource_context_map_.find(context);
@@ -224,4 +232,3 @@ ChromePluginServiceFilter::ProcessDetails::ProcessDetails(
ChromePluginServiceFilter::ProcessDetails::~ProcessDetails() {
}
-
« no previous file with comments | « no previous file | chrome/common/chrome_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698