Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: content/browser/utility_process_host_impl.cc

Issue 1901513003: Re-land: "Use a token to initialise ChannelMojo and MojoApplication everywhere." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d59249619b34299e4a5e148e28a8cbe4174a5835..c025a4a6e9dc53b9b7485163832f4fa553b12338 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -259,8 +259,6 @@ bool UtilityProcessHostImpl::StartProcess() {
return false;
}
- std::string mojo_token = mojo_application_host_->InitWithToken();
-
if (RenderProcessHost::run_renderer_in_process()) {
DCHECK(g_utility_main_thread_factory);
// See comment in RenderProcessHostImpl::Init() for the background on why we
@@ -269,7 +267,7 @@ bool UtilityProcessHostImpl::StartProcess() {
g_utility_main_thread_factory(InProcessChildThreadParams(
channel_id, BrowserThread::UnsafeGetMessageLoopForThread(
BrowserThread::IO)->task_runner(),
- mojo::MessagePipeHandle(), mojo_token)));
+ std::string(), mojo_application_host_->GetToken())));
in_process_thread_->Start();
} else {
const base::CommandLine& browser_command_line =
@@ -348,7 +346,7 @@ bool UtilityProcessHostImpl::StartProcess() {
#endif
cmd_line->AppendSwitchASCII(switches::kMojoApplicationChannelToken,
- mojo_token);
+ mojo_application_host_->GetToken());
process_->Launch(
new UtilitySandboxedProcessLauncherDelegate(exposed_dir_,
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698