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

Unified Diff: services/shell/runner/host/child_process_host.cc

Issue 2019973002: [mojo-edk] Bind a child token to child launches and port reservations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 | « services/shell/runner/host/child_process_host.h ('k') | services/shell/tests/shell/driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/runner/host/child_process_host.cc
diff --git a/services/shell/runner/host/child_process_host.cc b/services/shell/runner/host/child_process_host.cc
index b01ce96996e653fdb678432c1fe651380560d53b..c91f29c0abd8279d9314d376d860d550831f4a69 100644
--- a/services/shell/runner/host/child_process_host.cc
+++ b/services/shell/runner/host/child_process_host.cc
@@ -50,6 +50,7 @@ ChildProcessHost::ChildProcessHost(base::TaskRunner* launch_process_runner,
start_sandboxed_(start_sandboxed),
target_(target),
app_path_(app_path),
+ child_token_(mojo::edk::GenerateRandomToken()),
start_child_process_event_(
base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED),
@@ -98,7 +99,8 @@ mojom::ShellClientPtr ChildProcessHost::Start(
child_command_line.get(), &handle_passing_info_);
mojom::ShellClientPtr client =
- PassShellClientRequestOnCommandLine(child_command_line.get());
+ PassShellClientRequestOnCommandLine(child_command_line.get(),
+ child_token_);
launch_process_runner_->PostTaskAndReply(
FROM_HERE,
base::Bind(&ChildProcessHost::DoLaunch, base::Unretained(this),
@@ -202,7 +204,8 @@ void ChildProcessHost::DoLaunch(
mojo::edk::ChildProcessLaunched(
child_process_.Handle(),
mojo::edk::ScopedPlatformHandle(mojo::edk::PlatformHandle(
- mojo_ipc_channel_->PassServerHandle().release().handle)));
+ mojo_ipc_channel_->PassServerHandle().release().handle)),
+ child_token_);
}
}
start_child_process_event_.Signal();
« no previous file with comments | « services/shell/runner/host/child_process_host.h ('k') | services/shell/tests/shell/driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698