From fa6caa4ffb83896cb42198f35ca7837ae3b7c83c Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Fri, 5 Jun 2009 05:35:07 +0000 Subject: Fix regression from r11509 which caused each plugin instance to have its own IPC channel (doh!). BUG=119052 TEST=covered by ui test that Amit added Review URL: http://codereview.chromium.org/119158 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17712 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/plugin/plugin_channel.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'chrome/plugin/plugin_channel.cc') diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc index 5d6143e..4ff7b2b 100644 --- a/chrome/plugin/plugin_channel.cc +++ b/chrome/plugin/plugin_channel.cc @@ -12,10 +12,11 @@ #include "chrome/common/chrome_switches.h" #include "chrome/plugin/plugin_thread.h" -PluginChannel* PluginChannel::GetPluginChannel(MessageLoop* ipc_message_loop) { - static int next_id; +PluginChannel* PluginChannel::GetPluginChannel( + int process_id, MessageLoop* ipc_message_loop) { + // map renderer's process id to a (single) channel to that process std::string channel_name = StringPrintf( - "%d.r%d", base::GetCurrentProcId(), ++next_id); + "%d.r%d", base::GetCurrentProcId(), process_id); return static_cast(PluginChannelBase::GetChannel( channel_name, -- cgit v1.1