diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-17 02:20:46 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-17 02:20:46 +0000 |
commit | 5c41e6e1cd446c3b2bc0ed17e66dffbc76f7c650 (patch) | |
tree | 81e2f1a63b2109464dde8efa38b32381e2001829 /content/common/np_channel_base.cc | |
parent | ab25e338556b9580c54b3f4025009eaaf6ac83d3 (diff) | |
download | chromium_src-5c41e6e1cd446c3b2bc0ed17e66dffbc76f7c650.zip chromium_src-5c41e6e1cd446c3b2bc0ed17e66dffbc76f7c650.tar.gz chromium_src-5c41e6e1cd446c3b2bc0ed17e66dffbc76f7c650.tar.bz2 |
Verify the child process with a secret hello
BUG=117627
TEST=IPCSyncChannelTest.Verified
Review URL: http://codereview.chromium.org/9692035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/np_channel_base.cc')
-rw-r--r-- | content/common/np_channel_base.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/content/common/np_channel_base.cc b/content/common/np_channel_base.cc index 4209b0c..7226c48 100644 --- a/content/common/np_channel_base.cc +++ b/content/common/np_channel_base.cc @@ -24,8 +24,6 @@ typedef std::stack<scoped_refptr<NPChannelBase> > NPChannelRefStack; static base::LazyInstance<NPChannelRefStack>::Leaky g_lazy_channel_stack = LAZY_INSTANCE_INITIALIZER; -static int next_pipe_id = 0; - NPChannelBase* NPChannelBase::GetChannel( const IPC::ChannelHandle& channel_handle, IPC::Channel::Mode mode, ChannelFactory factory, base::MessageLoopProxy* ipc_message_loop, @@ -44,8 +42,8 @@ NPChannelBase* NPChannelBase::GetChannel( if (!channel->channel_valid()) { channel->channel_handle_ = channel_handle; if (mode & IPC::Channel::MODE_SERVER_FLAG) { - channel->channel_handle_.name.append("."); - channel->channel_handle_.name.append(base::IntToString(next_pipe_id++)); + channel->channel_handle_.name = + IPC::Channel::GenerateVerifiedChannelID(channel_key); } channel->mode_ = mode; if (channel->Init(ipc_message_loop, create_pipe_now, shutdown_event)) { |