summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/plugin_channel.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 05:35:07 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 05:35:07 +0000
commitfa6caa4ffb83896cb42198f35ca7837ae3b7c83c (patch)
tree7f42b778a87a10b5db39bbe26f3d380dda05f8eb /chrome/plugin/plugin_channel.cc
parenta57ea3fc6c3cfe3b44dcd0771d0d56c76bd238df (diff)
downloadchromium_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.cc7
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,