| 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..3a429006e6deb1dab05727ad704c0fd2504da435 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,18 @@ bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) {
|
|
|
| // Finally, check the plugin list.
|
| bool allow_wildcard = false;
|
| + ResourceDispatcherHostRequestInfo* info =
|
| + ResourceDispatcherHost::InfoForRequest(request_);
|
| + content::PluginFilter* filter =
|
| + content::GetContentClient()->browser()->CreatePluginFilter(
|
| + info->child_id(), info->route_id(), *info->context(),
|
| + request_->url(), GURL());
|
| 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(
|
| + request_->url(), type, allow_wildcard, filter,
|
| + &stale, &plugin, NULL);
|
| +
|
| if (need_plugin_list) {
|
| if (stale) {
|
| *need_plugin_list = true;
|
| @@ -401,11 +410,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(
|
|
|