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

Unified Diff: content/browser/renderer_host/buffered_resource_handler.cc

Issue 7387010: Add PluginServiceFilter interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 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 | « content/browser/plugin_service_filter.h ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/buffered_resource_handler.cc
diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc
index 8626682130365910e95ff966f7a87c74ac9f180c..9cf055919d8e2761522eae170a28efa646b8d117 100644
--- a/content/browser/renderer_host/buffered_resource_handler.cc
+++ b/content/browser/renderer_host/buffered_resource_handler.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/renderer_host/download_throttling_resource_handler.h"
#include "content/browser/browser_thread.h"
#include "content/browser/content_browser_client.h"
+#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
@@ -388,10 +389,16 @@ bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) {
// Finally, check the plugin list.
bool allow_wildcard = false;
+ ResourceDispatcherHostRequestInfo* info =
+ ResourceDispatcherHost::InfoForRequest(request_);
+ content::BrowserContext* browser_context = NULL; // XXX
Bernhard Bauer 2011/08/03 14:47:33 This is the only problem; I don't have a BrowserCo
jam 2011/08/03 16:20:43 Why not use ResourceContext instead of BrowserCont
Bernhard Bauer 2011/08/03 16:45:36 Because a BrowserContext is a Profile, and we alre
bool stale = false;
- std::vector<webkit::npapi::WebPluginInfo> plugins;
- webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
- request_->url(), type, allow_wildcard, &stale, &plugins, NULL);
+ webkit::npapi::WebPluginInfo plugin;
+ bool found = PluginService::GetInstance()->GetPluginInfo(
+ info->child_id(), info->route_id(), browser_context,
+ request_->url(), GURL(), type, allow_wildcard,
+ &stale, &plugin, NULL);
+
if (need_plugin_list) {
if (stale) {
*need_plugin_list = true;
@@ -401,11 +408,7 @@ bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) {
DCHECK(!stale);
}
- for (size_t i = 0; i < plugins.size(); ++i) {
- if (webkit::npapi::IsPluginEnabled(plugins[i]))
- return false;
- }
- return true;
+ return !found;
}
void BufferedResourceHandler::UseAlternateResourceHandler(
« no previous file with comments | « content/browser/plugin_service_filter.h ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698