diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 21:23:35 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 21:23:35 +0000 |
commit | 7ac2109a61fa55e6d83c9853947525be204cefdc (patch) | |
tree | 7d033b4c4e357dcd9cd7183066a220b1451d0973 /base/test/multiprocess_test.h | |
parent | 0085863a6706029fbdfa8cc37583aa3b81c16fdf (diff) | |
download | chromium_src-7ac2109a61fa55e6d83c9853947525be204cefdc.zip chromium_src-7ac2109a61fa55e6d83c9853947525be204cefdc.tar.gz chromium_src-7ac2109a61fa55e6d83c9853947525be204cefdc.tar.bz2 |
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
Diffstat (limited to 'base/test/multiprocess_test.h')
-rw-r--r-- | base/test/multiprocess_test.h | 19 |
1 files changed, 9 insertions, 10 deletions
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 @@ class MultiProcessTest : public PlatformTest { // 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 @@ class MultiProcessTest : public PlatformTest { 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); }; |