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

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

Issue 2348693003: [HBD] Placeholder for Flash content without fallback. (Closed)
Patch Set: Created 4 years, 3 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 b992a5d9d5747d6a0cbaa0206dd4c58da8c76ab0..1c744b24479f6257a50022e93891a4ced52d0b86 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_otr_state.h"
#include "chrome/common/chrome_content_client.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "components/component_updater/component_updater_service.h"
@@ -442,6 +443,15 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
// Otherwise, we only found disabled plugins, so we take the first one.
i = 0;
*status = ChromeViewHostMsg_GetPluginInfo_Status::kDisabled;
+
+ if (base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins) &&
+ matching_plugins[0].name ==
+ base::ASCIIToUTF16(content::kFlashPluginName)) {
+ // TODO(tommycli): This assumes that Flash can no longer be disabled
+ // via chrome://plugins. That should be fine since chrome://plugins is
+ // going away, but we should verify before launching HBD.
+ *status = ChromeViewHostMsg_GetPluginInfo_Status::kFlashHiddenPreferHtml;
+ }
}
*plugin = matching_plugins[i];

Powered by Google App Engine
This is Rietveld 408576698