Index: base/test/multiprocess_test.cc |
diff --git a/base/test/multiprocess_test.cc b/base/test/multiprocess_test.cc |
index 27f997077b92fa4da39dde3ad97cb071661e7f2a..e1ce7f871ea5e807a78c65fdecd66ae843e534e0 100644 |
--- a/base/test/multiprocess_test.cc |
+++ b/base/test/multiprocess_test.cc |
@@ -14,16 +14,32 @@ MultiProcessTest::MultiProcessTest() { |
ProcessHandle MultiProcessTest::SpawnChild(const std::string& procname, |
bool debug_on_start) { |
- FileHandleMappingVector empty_file_list; |
- return SpawnChildImpl(procname, empty_file_list, debug_on_start); |
+ LaunchOptions options; |
+#if defined(OS_WIN) |
+ options.start_hidden = true; |
+#endif |
+ return SpawnChildWithOptions(procname, options, debug_on_start); |
+} |
+ |
+#if !defined(OS_ANDROID) |
+ProcessHandle MultiProcessTest::SpawnChildWithOptions( |
+ const std::string& procname, |
+ const LaunchOptions& options, |
+ bool debug_on_start) { |
+ ProcessHandle handle = kNullProcessHandle; |
+ LaunchProcess(MakeCmdLine(procname, debug_on_start), options, &handle); |
+ return handle; |
} |
+#endif |
#if defined(OS_POSIX) |
ProcessHandle MultiProcessTest::SpawnChild( |
const std::string& procname, |
const FileHandleMappingVector& fds_to_map, |
bool debug_on_start) { |
- return SpawnChildImpl(procname, fds_to_map, debug_on_start); |
+ LaunchOptions options; |
+ options.fds_to_remap = &fds_to_map; |
+ return SpawnChildWithOptions(procname, options, debug_on_start); |
} |
#endif |
@@ -36,21 +52,4 @@ CommandLine MultiProcessTest::MakeCmdLine(const std::string& procname, |
return cl; |
} |
-#if !defined(OS_ANDROID) |
-ProcessHandle MultiProcessTest::SpawnChildImpl( |
- const std::string& procname, |
- const FileHandleMappingVector& fds_to_map, |
- bool debug_on_start) { |
- ProcessHandle handle = kNullProcessHandle; |
- base::LaunchOptions options; |
-#if defined(OS_WIN) |
- options.start_hidden = true; |
-#else |
- options.fds_to_remap = &fds_to_map; |
-#endif |
- base::LaunchProcess(MakeCmdLine(procname, debug_on_start), options, &handle); |
- return handle; |
-} |
-#endif // !defined(OS_ANDROID) |
- |
} // namespace base |