Index: content/browser/utility_process_host_impl.cc |
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc |
index 4debf70b740f42076725968aad15831228f46120..e7400d0252b1b0201f683e8f57717c1329c00a0e 100644 |
--- a/content/browser/utility_process_host_impl.cc |
+++ b/content/browser/utility_process_host_impl.cc |
@@ -25,13 +25,13 @@ |
#include "content/browser/browser_child_process_host_impl.h" |
#include "content/browser/mojo/constants.h" |
#include "content/browser/mojo/mojo_child_connection.h" |
-#include "content/browser/mojo/mojo_shell_context.h" |
#include "content/browser/renderer_host/render_process_host_impl.h" |
#include "content/common/child_process_host_impl.h" |
#include "content/common/in_process_child_thread_params.h" |
#include "content/common/utility_messages.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/content_browser_client.h" |
+#include "content/public/browser/shell_context.h" |
#include "content/public/browser/utility_process_host_client.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/mojo_channel_switches.h" |
@@ -39,6 +39,7 @@ |
#include "content/public/common/process_type.h" |
#include "content/public/common/sandbox_type.h" |
#include "content/public/common/sandboxed_process_launcher_delegate.h" |
+#include "ipc/ipc.mojom.h" |
#include "ipc/ipc_switches.h" |
#include "mojo/edk/embedder/embedder.h" |
#include "services/shell/public/cpp/connection.h" |
@@ -174,7 +175,7 @@ UtilityProcessHostImpl::UtilityProcessHostImpl( |
kUtilityMojoApplicationName, |
base::StringPrintf("%d_0", process_->GetData().id), |
child_token_, |
- MojoShellContext::GetConnectorForIOThread())); |
+ ShellContext::GetConnectorForIOThread())); |
} |
UtilityProcessHostImpl::~UtilityProcessHostImpl() { |
@@ -268,9 +269,10 @@ bool UtilityProcessHostImpl::StartProcess() { |
process_->SetName(name_); |
- std::string mojo_channel_token = |
- process_->GetHost()->CreateChannelMojo(child_token_); |
- if (mojo_channel_token.empty()) { |
+ IPC::mojom::BootstrapPtr bootstrap; |
+ mojo_child_connection_->connection()->GetInterface(&bootstrap); |
+ if (!process_->GetHost()->CreateChannelMojoWithBootstrap( |
+ bootstrap.PassInterface().PassHandle())) { |
NotifyAndDelete(LAUNCH_RESULT_FAILURE); |
return false; |
} |
@@ -283,7 +285,7 @@ bool UtilityProcessHostImpl::StartProcess() { |
g_utility_main_thread_factory(InProcessChildThreadParams( |
std::string(), BrowserThread::UnsafeGetMessageLoopForThread( |
BrowserThread::IO)->task_runner(), |
- mojo_channel_token, mojo_child_connection_->shell_client_token()))); |
+ std::string(), mojo_child_connection_->shell_client_token()))); |
in_process_thread_->Start(); |
} else { |
const base::CommandLine& browser_command_line = |
@@ -320,8 +322,6 @@ bool UtilityProcessHostImpl::StartProcess() { |
cmd_line->AppendSwitchASCII(switches::kProcessType, |
switches::kUtilityProcess); |
- cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, |
- mojo_channel_token); |
std::string locale = GetContentClient()->browser()->GetApplicationLocale(); |
cmd_line->AppendSwitchASCII(switches::kLang, locale); |