Index: content/common/mojo/mojo_channel_init.cc |
diff --git a/content/common/mojo/mojo_channel_init.cc b/content/common/mojo/mojo_channel_init.cc |
index 16661ab1121f874d2d3d2d36ee66c2aa3cbfe6cc..59137243a72a199dc40f8faf5350463904149e62 100644 |
--- a/content/common/mojo/mojo_channel_init.cc |
+++ b/content/common/mojo/mojo_channel_init.cc |
@@ -16,7 +16,6 @@ MojoChannelInit::MojoChannelInit() |
} |
MojoChannelInit::~MojoChannelInit() { |
- bootstrap_message_pipe_.reset(); |
if (channel_info_) { |
io_thread_task_runner_->PostTask( |
FROM_HERE, |
@@ -24,18 +23,19 @@ MojoChannelInit::~MojoChannelInit() { |
} |
} |
-void MojoChannelInit::Init( |
+mojo::ScopedMessagePipeHandle MojoChannelInit::Init( |
base::PlatformFile file, |
scoped_refptr<base::TaskRunner> io_thread_task_runner) { |
DCHECK(!io_thread_task_runner_.get()); // Should only init once. |
io_thread_task_runner_ = io_thread_task_runner; |
- bootstrap_message_pipe_ = mojo::embedder::CreateChannel( |
+ mojo::ScopedMessagePipeHandle message_pipe = mojo::embedder::CreateChannel( |
mojo::embedder::ScopedPlatformHandle( |
mojo::embedder::PlatformHandle(file)), |
io_thread_task_runner, |
base::Bind(&MojoChannelInit::OnCreatedChannel, weak_factory_.GetWeakPtr(), |
io_thread_task_runner), |
base::MessageLoop::current()->message_loop_proxy()).Pass(); |
+ return message_pipe.Pass(); |
} |
// static |