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

Unified Diff: chrome/browser/renderer_host/resource_message_filter.cc

Issue 3015029: Replace ViewHostMsg_GetPluginPath with ViewHostMsg_GetPluginInfo. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: compile fixes Created 10 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 | « chrome/browser/renderer_host/resource_message_filter.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_message_filter.cc
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index db19895075e9e0d7a3a9f2b952dcf9d124a3a18a..3d60d80b29ed4a99aec308c40fba8830db8f618a 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -366,7 +366,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_PreCacheFont, OnPreCacheFont)
#endif
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetPlugins, OnGetPlugins)
- IPC_MESSAGE_HANDLER(ViewHostMsg_GetPluginPath, OnGetPluginPath)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_GetPluginInfo, OnGetPluginInfo)
IPC_MESSAGE_HANDLER(ViewHostMsg_DownloadUrl, OnDownloadUrl)
IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_ContextMenu,
OnReceiveContextMenuMsg(msg))
@@ -692,13 +692,22 @@ void ResourceMessageFilter::OnGetPluginsOnFileThread(
NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg));
}
-void ResourceMessageFilter::OnGetPluginPath(const GURL& url,
+void ResourceMessageFilter::OnGetPluginInfo(const GURL& url,
const GURL& policy_url,
const std::string& mime_type,
- FilePath* filename,
- std::string* url_mime_type) {
- *filename = plugin_service_->GetPluginPath(
- url, policy_url, mime_type, url_mime_type);
+ bool* found,
+ WebPluginInfo* info,
+ std::string* actual_mime_type) {
+ bool allow_wildcard = true;
+ *found = NPAPI::PluginList::Singleton()->GetPluginInfo(url,
+ mime_type,
+ allow_wildcard,
+ info,
+ actual_mime_type);
+ if (*found) {
+ info->enabled = info->enabled &&
+ plugin_service_->PrivatePluginAllowedForURL(info->path, policy_url);
+ }
}
void ResourceMessageFilter::OnOpenChannelToPlugin(const GURL& url,
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698