Index: base/test/multiprocess_test.cc |
diff --git a/base/test/multiprocess_test.cc b/base/test/multiprocess_test.cc |
index 6be5c46e87c38d85e360470a2978deafeec19ef7..d59fac20407ca9b31dfa2373e9cec2e3c9f4b137 100644 |
--- a/base/test/multiprocess_test.cc |
+++ b/base/test/multiprocess_test.cc |
@@ -9,6 +9,29 @@ |
namespace base { |
+#if !defined(OS_ANDROID) |
+ProcessHandle SpawnMultiProcessTestChild( |
+ const std::string& procname, |
+ const CommandLine& base_command_line, |
+ const LaunchOptions& options, |
+ bool debug_on_start) { |
+ CommandLine command_line(base_command_line); |
+ command_line.AppendSwitchASCII(switches::kTestChildProcess, procname); |
+ if (debug_on_start) |
+ command_line.AppendSwitch(switches::kDebugOnStart); |
+ |
+ ProcessHandle handle = kNullProcessHandle; |
+ LaunchProcess(command_line, options, &handle); |
+ return handle; |
+} |
+#endif |
Paweł Hajdan Jr.
2014/03/07 02:08:01
nit: // !defined(OS_ANDROID)
viettrungluu
2014/03/07 04:42:44
Done, but note that these are generally considered
|
+ |
+CommandLine GetMultiProcessTestChildBaseCommandLine() { |
+ return *CommandLine::ForCurrentProcess(); |
+} |
+ |
+// MultiProcessTest ------------------------------------------------------------ |
+ |
MultiProcessTest::MultiProcessTest() { |
} |
@@ -21,24 +44,19 @@ ProcessHandle MultiProcessTest::SpawnChild(const std::string& procname, |
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; |
+ return SpawnMultiProcessTestChild(procname, |
+ MakeCmdLine(procname, debug_on_start), |
+ options, |
+ debug_on_start); |
} |
-#endif |
-CommandLine MultiProcessTest::MakeCmdLine(const std::string& procname, |
- bool debug_on_start) { |
- CommandLine cl(*CommandLine::ForCurrentProcess()); |
- cl.AppendSwitchASCII(switches::kTestChildProcess, procname); |
- if (debug_on_start) |
- cl.AppendSwitch(switches::kDebugOnStart); |
- return cl; |
+CommandLine MultiProcessTest::MakeCmdLine(const std::string& /*procname*/, |
Paweł Hajdan Jr.
2014/03/07 02:08:01
nit: AFAIK we don't comment out parameter names.
viettrungluu
2014/03/07 04:42:44
Removed. <shrug>
|
+ bool /*debug_on_start*/) { |
+ return GetMultiProcessTestChildBaseCommandLine(); |
} |
} // namespace base |