summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/plugin_channel_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/plugin/plugin_channel_base.cc')
-rw-r--r--chrome/plugin/plugin_channel_base.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/chrome/plugin/plugin_channel_base.cc b/chrome/plugin/plugin_channel_base.cc
index df7cccc..5d18654 100644
--- a/chrome/plugin/plugin_channel_base.cc
+++ b/chrome/plugin/plugin_channel_base.cc
@@ -9,7 +9,6 @@
#include "base/auto_reset.h"
#include "base/hash_tables.h"
#include "base/lazy_instance.h"
-#include "base/string_number_conversions.h"
#include "chrome/common/child_process.h"
#include "ipc/ipc_sync_message.h"
@@ -25,15 +24,13 @@ static PluginChannelMap g_plugin_channels_;
static base::LazyInstance<std::stack<scoped_refptr<PluginChannelBase> > >
lazy_plugin_channel_stack_(base::LINKER_INITIALIZED);
-static int next_pipe_id = 0;
-
PluginChannelBase* PluginChannelBase::GetChannel(
- const std::string& channel_key, IPC::Channel::Mode mode,
+ const std::string& channel_name, IPC::Channel::Mode mode,
PluginChannelFactory factory, MessageLoop* ipc_message_loop,
bool create_pipe_now) {
scoped_refptr<PluginChannelBase> channel;
- PluginChannelMap::const_iterator iter = g_plugin_channels_.find(channel_key);
+ PluginChannelMap::const_iterator iter = g_plugin_channels_.find(channel_name);
if (iter == g_plugin_channels_.end()) {
channel = factory();
} else {
@@ -43,14 +40,10 @@ PluginChannelBase* PluginChannelBase::GetChannel(
DCHECK(channel != NULL);
if (!channel->channel_valid()) {
- channel->channel_name_ = channel_key;
- if (mode == IPC::Channel::MODE_SERVER) {
- channel->channel_name_.append(".");
- channel->channel_name_.append(base::IntToString(next_pipe_id++));
- }
+ channel->channel_name_ = channel_name;
channel->mode_ = mode;
if (channel->Init(ipc_message_loop, create_pipe_now)) {
- g_plugin_channels_[channel_key] = channel;
+ g_plugin_channels_[channel_name] = channel;
} else {
channel = NULL;
}