Index: content/child/child_thread_impl.cc |
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc |
index 7ae85f510d881327445a6d2db95fca79ae758430..f8b6c1e26b594d198332b07fa8c1fbdc7b9171cf 100644 |
--- a/content/child/child_thread_impl.cc |
+++ b/content/child/child_thread_impl.cc |
@@ -354,14 +354,13 @@ |
if (use_mojo_channel) { |
VLOG(1) << "Mojo is enabled on child"; |
mojo::ScopedMessagePipeHandle handle; |
- std::string token = IsInBrowserProcess() ? ipc_token : |
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
- switches::kMojoChannelToken); |
- if (token.empty()) { |
- IPC::mojom::BootstrapRequest request = GetProxy(&pending_bootstrap_); |
- handle = request.PassMessagePipe(); |
+ if (!IsInBrowserProcess()) { |
+ DCHECK(!handle.is_valid()); |
+ handle = mojo::edk::CreateChildMessagePipe( |
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
+ switches::kMojoChannelToken)); |
} else { |
- handle = mojo::edk::CreateChildMessagePipe(token); |
+ handle = mojo::edk::CreateChildMessagePipe(ipc_token); |
} |
DCHECK(handle.is_valid()); |
channel_->Init(IPC::ChannelMojo::CreateClientFactory(std::move(handle)), |
@@ -595,14 +594,6 @@ |
MojoShellConnection* ChildThreadImpl::GetMojoShellConnection() { |
return mojo_shell_connection_.get(); |
-} |
- |
-bool ChildThreadImpl::AcceptConnection(shell::Connection* connection) { |
- connection->GetInterfaceRegistry()->AddInterface( |
- IPC::mojom::Bootstrap::Name_, |
- base::Bind(&ChildThreadImpl::BindBootstrapRequest, |
- base::Unretained(this))); |
- return true; |
} |
shell::InterfaceRegistry* ChildThreadImpl::GetInterfaceRegistry() { |
@@ -777,13 +768,6 @@ |
base::Process::Current().Terminate(0, false); |
} |
-void ChildThreadImpl::BindBootstrapRequest( |
- mojo::ScopedMessagePipeHandle handle) { |
- IPC::mojom::BootstrapRequest request = |
- mojo::MakeRequest<IPC::mojom::Bootstrap>(std::move(handle)); |
- mojo::FuseInterface(std::move(request), pending_bootstrap_.PassInterface()); |
-} |
- |
bool ChildThreadImpl::IsInBrowserProcess() const { |
return static_cast<bool>(browser_process_io_runner_); |
} |