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

Unified Diff: mojo/edk/test/multiprocess_test_helper.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: revert stuff. Created 4 years, 7 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
Index: mojo/edk/test/multiprocess_test_helper.cc
diff --git a/mojo/edk/test/multiprocess_test_helper.cc b/mojo/edk/test/multiprocess_test_helper.cc
index 92e2968c03579be13116e8df823baa7b6bcac5b0..763e51a2d25b5aa94dde8ae540ac8a53f4f8ca24 100644
--- a/mojo/edk/test/multiprocess_test_helper.cc
+++ b/mojo/edk/test/multiprocess_test_helper.cc
@@ -116,13 +116,16 @@ ScopedMessagePipeHandle MultiprocessTestHelper::StartChildWithExtraSwitch(
#error "Not supported yet."
#endif
- ScopedMessagePipeHandle pipe = CreateParentMessagePipe(pipe_token);
+ std::string child_token = mojo::edk::GenerateRandomToken();
+ ScopedMessagePipeHandle pipe = CreateParentMessagePipe(pipe_token,
+ child_token);
test_child_ =
base::SpawnMultiProcessTestChild(test_child_main, command_line, options);
channel.ChildProcessLaunched();
- ChildProcessLaunched(test_child_.Handle(), channel.PassServerHandle());
+ ChildProcessLaunched(test_child_.Handle(), channel.PassServerHandle(),
+ child_token);
CHECK(test_child_.IsValid());
return pipe;

Powered by Google App Engine
This is Rietveld 408576698