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

Unified Diff: mojo/edk/test/multiprocess_test_helper.cc

Issue 2735113003: Changing SpawnChild to return a struct.
Patch Set: Created 3 years, 9 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 | « mojo/edk/system/node_controller.cc ('k') | mojo/public/c/system/platform_handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8eaccf08d6d63bcb4cec91bfc0074866d01ae207..7fb7be716f6f873515492328c2e6cb2ee0704775 100644
--- a/mojo/edk/test/multiprocess_test_helper.cc
+++ b/mojo/edk/test/multiprocess_test_helper.cc
@@ -34,6 +34,8 @@
#include "base/win/windows_version.h"
#elif defined(OS_MACOSX) && !defined(OS_IOS)
#include "base/mac/mach_port_broker.h"
+#elif defined(OS_ANDROID)
+// #include "base/android/parcelable_channel.h"
#endif
namespace mojo {
@@ -160,15 +162,25 @@ ScopedMessagePipeHandle MultiprocessTestHelper::StartChildWithExtraSwitch(
pipe = ConnectToPeerProcess(std::move(server_handle), peer_token_);
}
- test_child_ =
+ base::SpawnChildResult result =
base::SpawnMultiProcessTestChild(test_child_main, command_line, options);
+ test_child_ = std::move(result.process);
if (launch_type == LaunchType::CHILD || launch_type == LaunchType::PEER)
channel.ChildProcessLaunched();
if (launch_type == LaunchType::CHILD ||
launch_type == LaunchType::NAMED_CHILD) {
DCHECK(server_handle.is_valid());
- process.Connect(test_child_.Handle(), std::move(server_handle),
+#if defined(OS_ANDROID)
+ ConnectionParam connection_param(std::move(server_handle),
+ base::android::ParcelableChannelClient(
+ result.parcelable_channel_client),
+ base::android::ParcelableChannelServer(
+ result.parcelable_channel_server));
+#else
+ ConnectionParam connection_param(std::move(server_handle));
+#endif
+ process.Connect(test_child_.Handle(), std::move(connection_param),
process_error_callback_);
}
« no previous file with comments | « mojo/edk/system/node_controller.cc ('k') | mojo/public/c/system/platform_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698