Index: content/common/child_process_host_impl.cc |
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc |
index c64d2b71c3ffe8a5759cec1c98dbef314d6bc73b..082906f5b6f48f77e40e524c4236c98af6cc10e8 100644 |
--- a/content/common/child_process_host_impl.cc |
+++ b/content/common/child_process_host_impl.cc |
@@ -121,16 +121,13 @@ void ChildProcessHostImpl::ForceShutdown() { |
} |
std::string ChildProcessHostImpl::CreateChannelMojo( |
- const std::string& child_token) { |
+ mojo::edk::PendingProcessConnection* connection) { |
DCHECK(channel_id_.empty()); |
- channel_id_ = mojo::edk::GenerateRandomToken(); |
- mojo::ScopedMessagePipeHandle host_handle = |
- mojo::edk::CreateParentMessagePipe(channel_id_, child_token); |
- channel_ = IPC::ChannelMojo::Create(std::move(host_handle), |
- IPC::Channel::MODE_SERVER, this); |
+ channel_ = |
+ IPC::ChannelMojo::Create(connection->CreateMessagePipe(&channel_id_), |
+ IPC::Channel::MODE_SERVER, this); |
if (!channel_ || !InitChannel()) |
return std::string(); |
- |
return channel_id_; |
} |