| Index: content/child/child_thread_impl.cc
|
| diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
|
| index 9188e48e2bc86590831af1cd72602a194f119609..fda78fd1bf676ec8e63561d4c3d77374a1e242da 100644
|
| --- a/content/child/child_thread_impl.cc
|
| +++ b/content/child/child_thread_impl.cc
|
| @@ -266,6 +266,8 @@ ChildThreadImpl::Options::Builder::InBrowserProcess(
|
| options_.browser_process_io_runner = params.io_runner();
|
| options_.channel_name = params.channel_name();
|
| options_.in_process_message_pipe_handle = params.handle();
|
| + options_.in_process_application_message_pipe_handle =
|
| + params.application_handle();
|
| return *this;
|
| }
|
|
|
| @@ -390,6 +392,18 @@ void ChildThreadImpl::Init(const Options& options) {
|
| }
|
|
|
| mojo_application_.reset(new MojoApplication(GetIOTaskRunner()));
|
| + if (!IsInBrowserProcess()) {
|
| + std::string mojo_application_token =
|
| + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| + switches::kMojoApplicationChannelToken);
|
| + if (!mojo_application_token.empty())
|
| + mojo_application_->InitWithToken(mojo_application_token);
|
| + } else {
|
| + mojo::ScopedMessagePipeHandle handle(
|
| + options.in_process_application_message_pipe_handle);
|
| + if (handle.is_valid())
|
| + mojo_application_->InitWithPipe(std::move(handle));
|
| + }
|
|
|
| sync_message_filter_ = channel_->CreateSyncMessageFilter();
|
| thread_safe_sender_ = new ThreadSafeSender(
|
|
|