| Index: content/browser/plugin_service_impl.cc
|
| ===================================================================
|
| --- content/browser/plugin_service_impl.cc (revision 180109)
|
| +++ content/browser/plugin_service_impl.cc (working copy)
|
| @@ -259,13 +259,9 @@
|
| }
|
|
|
| PluginProcessHost* PluginServiceImpl::FindOrStartNpapiPluginProcess(
|
| - int render_process_id,
|
| const FilePath& plugin_path) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
|
|
| - if (filter_ && !filter_->CanLoadPlugin(render_process_id, plugin_path))
|
| - return NULL;
|
| -
|
| PluginProcessHost* plugin_host = FindNpapiPluginProcess(plugin_path);
|
| if (plugin_host)
|
| return plugin_host;
|
| @@ -285,15 +281,11 @@
|
| }
|
|
|
| PpapiPluginProcessHost* PluginServiceImpl::FindOrStartPpapiPluginProcess(
|
| - int render_process_id,
|
| const FilePath& plugin_path,
|
| const FilePath& profile_data_directory,
|
| PpapiPluginProcessHost::PluginClient* client) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
|
|
| - if (filter_ && !filter_->CanLoadPlugin(render_process_id, plugin_path))
|
| - return NULL;
|
| -
|
| PpapiPluginProcessHost* plugin_host =
|
| FindPpapiPluginProcess(plugin_path, profile_data_directory);
|
| if (plugin_host)
|
| @@ -311,13 +303,9 @@
|
| }
|
|
|
| PpapiPluginProcessHost* PluginServiceImpl::FindOrStartPpapiBrokerProcess(
|
| - int render_process_id,
|
| const FilePath& plugin_path) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
|
|
| - if (filter_ && !filter_->CanLoadPlugin(render_process_id, plugin_path))
|
| - return NULL;
|
| -
|
| PpapiPluginProcessHost* plugin_host = FindPpapiBrokerProcess(plugin_path);
|
| if (plugin_host)
|
| return plugin_host;
|
| @@ -358,12 +346,11 @@
|
| }
|
|
|
| void PluginServiceImpl::OpenChannelToPpapiPlugin(
|
| - int render_process_id,
|
| const FilePath& plugin_path,
|
| const FilePath& profile_data_directory,
|
| PpapiPluginProcessHost::PluginClient* client) {
|
| PpapiPluginProcessHost* plugin_host = FindOrStartPpapiPluginProcess(
|
| - render_process_id, plugin_path, profile_data_directory, client);
|
| + plugin_path, profile_data_directory, client);
|
| if (plugin_host) {
|
| plugin_host->OpenChannelToPlugin(client);
|
| } else {
|
| @@ -373,11 +360,9 @@
|
| }
|
|
|
| void PluginServiceImpl::OpenChannelToPpapiBroker(
|
| - int render_process_id,
|
| const FilePath& path,
|
| PpapiPluginProcessHost::BrokerClient* client) {
|
| - PpapiPluginProcessHost* plugin_host = FindOrStartPpapiBrokerProcess(
|
| - render_process_id, path);
|
| + PpapiPluginProcessHost* plugin_host = FindOrStartPpapiBrokerProcess(path);
|
| if (plugin_host) {
|
| plugin_host->OpenChannelToPlugin(client);
|
| } else {
|
| @@ -426,14 +411,10 @@
|
| BrowserThread::PostTask(
|
| BrowserThread::IO, FROM_HERE,
|
| base::Bind(&PluginServiceImpl::FinishOpenChannelToPlugin,
|
| - base::Unretained(this),
|
| - render_process_id,
|
| - plugin_path,
|
| - client));
|
| + base::Unretained(this), plugin_path, client));
|
| }
|
|
|
| void PluginServiceImpl::FinishOpenChannelToPlugin(
|
| - int render_process_id,
|
| const FilePath& plugin_path,
|
| PluginProcessHost::Client* client) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| @@ -443,8 +424,7 @@
|
| return;
|
| pending_plugin_clients_.erase(client);
|
|
|
| - PluginProcessHost* plugin_host = FindOrStartNpapiPluginProcess(
|
| - render_process_id, plugin_path);
|
| + PluginProcessHost* plugin_host = FindOrStartNpapiPluginProcess(plugin_path);
|
| if (plugin_host) {
|
| client->OnFoundPluginProcessHost(plugin_host);
|
| plugin_host->OpenChannelToPlugin(client);
|
| @@ -483,7 +463,7 @@
|
| *is_stale = stale;
|
|
|
| for (size_t i = 0; i < plugins.size(); ++i) {
|
| - if (!filter_ || filter_->IsPluginEnabled(render_process_id,
|
| + if (!filter_ || filter_->ShouldUsePlugin(render_process_id,
|
| render_view_id,
|
| context,
|
| url,
|
|
|