Add a MultiProcessTest::SpawnChildWithOptions().

Replace SpawnChildImpl() with SpawnChildWithOptions(). Leave the
now-superfluous POSIX-only SpawnChild() that takes a
FileHandleMappingVector for now.

R=brettw@chromium.org, brettw

Review URL: https://codereview.chromium.org/104803007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239258 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 7ac2109a61fa55e6d83c9853947525be204cefdc
diff --git a/base/test/multiprocess_test.h b/base/test/multiprocess_test.h
index 3bbb739..4bf70ab 100644
--- a/base/test/multiprocess_test.h
+++ b/base/test/multiprocess_test.h
@@ -56,10 +56,16 @@
   // Returns the handle to the child, or NULL on failure
   ProcessHandle SpawnChild(const std::string& procname, bool debug_on_start);
 
+  // Run a child process using the given launch options.
+  //
+  // Note: On Windows, you probably want to set |options.start_hidden|.
+  ProcessHandle SpawnChildWithOptions(const std::string& procname,
+                                      const LaunchOptions& options,
+                                      bool debug_on_start);
+
 #if defined(OS_POSIX)
-  // TODO(evan): see if we can delete this via more refactoring.
-  // SpawnChild() should just take a base::LaunchOptions so that we don't
-  // need multiple versions of it.
+  // TODO(vtl): Remove this in favor of |SpawnChildWithOptions()|. Probably keep
+  // the no-options |SpawnChild()| around for ease-of-use.
   ProcessHandle SpawnChild(const std::string& procname,
                            const FileHandleMappingVector& fds_to_map,
                            bool debug_on_start);
@@ -70,13 +76,6 @@
                                   bool debug_on_start);
 
  private:
-  // Shared implementation of SpawnChild.
-  // TODO: |fds_to_map| is unused on Windows; see above TODO about
-  // further refactoring.
-  ProcessHandle SpawnChildImpl(const std::string& procname,
-                               const FileHandleMappingVector& fds_to_map,
-                               bool debug_on_start);
-
   DISALLOW_COPY_AND_ASSIGN(MultiProcessTest);
 };