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

Unified Diff: base/process_util_win.cc

Issue 7377012: Change base::LaunchProcess API slightly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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
« no previous file with comments | « base/process_util_unittest.cc ('k') | base/test/multiprocess_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_win.cc
diff --git a/base/process_util_win.cc b/base/process_util_win.cc
index c11878ee35c7f54e94f017d4e2ac6b0885b99309..9aa7f4471a9b0f0fec6de806f0a503c70ad6cb55 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
« no previous file with comments | « base/process_util_unittest.cc ('k') | base/test/multiprocess_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698