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

Unified Diff: services/shell/tests/util.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/tests/shell/driver.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/tests/util.cc
diff --git a/services/shell/tests/util.cc b/services/shell/tests/util.cc
index 6449cc34c059175090e1d71abfe3fac64a6f8261..ea8e385435a7bf5b82c32dbaad10f8d5f996393d 100644
--- a/services/shell/tests/util.cc
+++ b/services/shell/tests/util.cc
@@ -65,8 +65,9 @@ std::unique_ptr<Connection> LaunchAndConnectToProcess(
primordial_pipe_token);
// Allocate the pipe locally.
+ std::string child_token = mojo::edk::GenerateRandomToken();
mojo::ScopedMessagePipeHandle pipe =
- mojo::edk::CreateParentMessagePipe(primordial_pipe_token);
+ mojo::edk::CreateParentMessagePipe(primordial_pipe_token, child_token);
shell::mojom::ShellClientPtr client;
client.Bind(
@@ -94,7 +95,8 @@ std::unique_ptr<Connection> LaunchAndConnectToProcess(
DCHECK(process->IsValid());
receiver->SetPID(process->Pid());
mojo::edk::ChildProcessLaunched(process->Handle(),
- platform_channel_pair.PassServerHandle());
+ platform_channel_pair.PassServerHandle(),
+ child_token);
return connection;
}
« no previous file with comments | « services/shell/tests/shell/driver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698