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

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

Issue 2284053002: Register a fake Flash with chrome://plugins during browser start-up. (Closed)
Patch Set: Created 4 years, 4 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_content_client.h » ('j') | chrome/common/chrome_content_client.h » ('J')
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 bee46bea0234e0b155ac69059978fa6e2e2a16af..691bb87cf5fa358c37a5873ed913600ebbb5b21b 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/plugins/plugin_prefs.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_otr_state.h"
+#include "chrome/common/chrome_content_client.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "components/component_updater/component_updater_service.h"
@@ -404,6 +405,13 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
std::vector<std::string> mime_types;
PluginService::GetInstance()->GetPluginInfoArray(
url, mime_type, allow_wildcard, &matching_plugins, &mime_types);
+ base::FilePath notPresent =
+ base::FilePath::FromUTF8Unsafe(ChromeContentClient::kNotPresent);
Will Harris 2016/08/26 22:52:35 kNotPresent definition is only available for GOOGL
waffles 2016/08/26 23:10:04 Whoops! Done... although maybe it's better to just
+ matching_plugins.erase(
+ std::remove_if(
+ matching_plugins.begin(), matching_plugins.end(),
+ [&](const WebPluginInfo& info) { return info.path == notPresent; }),
+ matching_plugins.end());
if (matching_plugins.empty()) {
*status = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound;
return false;
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.h » ('j') | chrome/common/chrome_content_client.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698