diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 05:35:07 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 05:35:07 +0000 |
commit | fa6caa4ffb83896cb42198f35ca7837ae3b7c83c (patch) | |
tree | 7f42b778a87a10b5db39bbe26f3d380dda05f8eb /chrome/plugin/plugin_channel.cc | |
parent | a57ea3fc6c3cfe3b44dcd0771d0d56c76bd238df (diff) | |
download | chromium_src-fa6caa4ffb83896cb42198f35ca7837ae3b7c83c.zip chromium_src-fa6caa4ffb83896cb42198f35ca7837ae3b7c83c.tar.gz chromium_src-fa6caa4ffb83896cb42198f35ca7837ae3b7c83c.tar.bz2 |
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
Diffstat (limited to 'chrome/plugin/plugin_channel.cc')
-rw-r--r-- | chrome/plugin/plugin_channel.cc | 7 |
1 files changed, 4 insertions, 3 deletions
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<PluginChannel*>(PluginChannelBase::GetChannel( channel_name, |