diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-15 16:47:02 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-15 16:47:02 +0000 |
commit | e599218171e942749da5c8b3931b091655c1b74c (patch) | |
tree | 703ee7f0427e0bafabb1402e678c40c31acec38e /base/process_util_win.cc | |
parent | 24ea7da0968595f5365a537fba548e9163f1f371 (diff) | |
download | chromium_src-e599218171e942749da5c8b3931b091655c1b74c.zip chromium_src-e599218171e942749da5c8b3931b091655c1b74c.tar.gz chromium_src-e599218171e942749da5c8b3931b091655c1b74c.tar.bz2 |
Change base::LaunchProcess API slightly
Rather than passing the out param process handle via the options,
take it as a function argument. This simplifies many callers.
BUG=88990
Review URL: http://codereview.chromium.org/7377012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92701 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_win.cc')
-rw-r--r-- | base/process_util_win.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/base/process_util_win.cc b/base/process_util_win.cc index c11878e..9aa7f44 100644 --- a/base/process_util_win.cc +++ b/base/process_util_win.cc @@ -218,7 +218,8 @@ bool GetProcessIntegrityLevel(ProcessHandle process, IntegrityLevel *level) { } bool LaunchProcess(const string16& cmdline, - const LaunchOptions& options) { + const LaunchOptions& options, + ProcessHandle* process_handle) { STARTUPINFO startup_info = {}; startup_info.cb = sizeof(startup_info); if (options.empty_desktop_name) @@ -259,8 +260,8 @@ bool LaunchProcess(const string16& cmdline, WaitForSingleObject(process_info.hProcess, INFINITE); // If the caller wants the process handle, we won't close it. - if (options.process_handle) { - *options.process_handle = process_info.hProcess; + if (process_handle) { + *process_handle = process_info.hProcess; } else { CloseHandle(process_info.hProcess); } @@ -268,8 +269,9 @@ bool LaunchProcess(const string16& cmdline, } bool LaunchProcess(const CommandLine& cmdline, - const LaunchOptions& options) { - return LaunchProcess(cmdline.command_line_string(), options); + const LaunchOptions& options, + ProcessHandle* process_handle) { + return LaunchProcess(cmdline.command_line_string(), options, process_handle); } // Attempts to kill the process identified by the given process |