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

Unified Diff: base/test/multiprocess_test_android.cc

Issue 843113003: MultiProcessTest: Update SpawnChild* to return a Process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: base/test/multiprocess_test_android.cc
diff --git a/base/test/multiprocess_test_android.cc b/base/test/multiprocess_test_android.cc
index 8f54b82b5ea4512bf15c4e3b21116e495a7783cb..dc489d134d10a3e6c4a48f7335a0d5c08069477d 100644
--- a/base/test/multiprocess_test_android.cc
+++ b/base/test/multiprocess_test_android.cc
@@ -19,9 +19,9 @@ namespace base {
// and we don't have an executable to exec*. This implementation does the bare
// minimum to execute the method specified by procname (in the child process).
// - All options except |fds_to_remap| are ignored.
-ProcessHandle SpawnMultiProcessTestChild(const std::string& procname,
- const CommandLine& base_command_line,
- const LaunchOptions& options) {
+Process SpawnMultiProcessTestChild(const std::string& procname,
+ const CommandLine& base_command_line,
+ const LaunchOptions& options) {
// TODO(viettrungluu): The FD-remapping done below is wrong in the presence of
// cycles (e.g., fd1 -> fd2, fd2 -> fd1). crbug.com/326576
FileHandleMappingVector empty;
@@ -32,11 +32,11 @@ ProcessHandle SpawnMultiProcessTestChild(const std::string& procname,
if (pid < 0) {
PLOG(ERROR) << "fork";
- return kNullProcessHandle;
+ return Process();
}
if (pid > 0) {
// Parent process.
- return pid;
+ return Process(pid);
}
// Child process.
base::hash_set<int> fds_to_keep_open;
@@ -69,7 +69,7 @@ ProcessHandle SpawnMultiProcessTestChild(const std::string& procname,
command_line->AppendSwitchASCII(switches::kTestChildProcess, procname);
_exit(multi_process_function_list::InvokeChildProcessTest(procname));
- return 0;
+ return Process();
}
} // namespace base
« no previous file with comments | « base/test/multiprocess_test.cc ('k') | chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698