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

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

Issue 2511263003: [HBD] Fix the misleading no-fallback placeholder message in BLOCK mode. (Closed)
Patch Set: Created 4 years, 1 month 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 2fdaaeabc89fb2608d6e93f2ccbd7398afef2c31..5954a6c62b739adfe05dea35d56e22696cb49d31 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -334,6 +334,16 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT);
DCHECK(plugin_setting != CONTENT_SETTING_ASK);
+ if (*status ==
+ ChromeViewHostMsg_GetPluginInfo_Status::kFlashHiddenPreferHtml) {
+ if (plugin_setting == CONTENT_SETTING_BLOCK) {
+ *status = is_managed && !legacy_ask_user
+ ? ChromeViewHostMsg_GetPluginInfo_Status::kBlockedByPolicy
+ : ChromeViewHostMsg_GetPluginInfo_Status::kBlockedNoLoading;
+ }
+ return;
+ }
+
#if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
// Check if the plugin is outdated.
if (plugin_status == PluginMetadata::SECURITY_STATUS_OUT_OF_DATE &&
@@ -455,6 +465,10 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
// 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;
+
+ // In the Prefer HTML case, the plugin is actually enabled, but hidden.
+ // It will still be blocked in the body of DecidePluginStatus.
+ enabled = true;
}
}

Powered by Google App Engine
This is Rietveld 408576698