Index: base/process/launch.h |
diff --git a/base/process/launch.h b/base/process/launch.h |
index 261019b138f5fe5da7f4e9fd0a451c8a1e06e0bb..06abb297965f4a43822de21f22b25415e8518262 100644 |
--- a/base/process/launch.h |
+++ b/base/process/launch.h |
@@ -14,6 +14,7 @@ |
#include "base/base_export.h" |
#include "base/basictypes.h" |
#include "base/environment.h" |
+#include "base/process/process.h" |
#include "base/process/process_handle.h" |
#include "base/strings/string_piece.h" |
@@ -143,12 +144,7 @@ struct BASE_EXPORT LaunchOptions { |
// Launch a process via the command line |cmdline|. |
// See the documentation of LaunchOptions for details on |options|. |
// |
-// Returns true upon success. |
-// |
-// Upon success, if |process_handle| is non-null, it will be filled in with the |
-// handle of the launched process. NOTE: In this case, the caller is |
-// responsible for closing the handle so that it doesn't leak! |
-// Otherwise, the process handle will be implicitly closed. |
+// Returns a valid Process upon success. |
// |
// Unix-specific notes: |
// - All file descriptors open in the parent process will be closed in the |
@@ -158,6 +154,11 @@ struct BASE_EXPORT LaunchOptions { |
// parent's stdout and stderr. |
// - If the first argument on the command line does not contain a slash, |
// PATH will be searched. (See man execvp.) |
+BASE_EXPORT Process LaunchProcess(const CommandLine& cmdline, |
+ const LaunchOptions& options); |
+ |
+// Deprecated version. |
+// TODO(rvargas) crbug.com/417532: Remove this after migrating all consumers. |
BASE_EXPORT bool LaunchProcess(const CommandLine& cmdline, |
const LaunchOptions& options, |
ProcessHandle* process_handle); |
@@ -180,12 +181,10 @@ BASE_EXPORT bool LaunchProcess(const string16& cmdline, |
// Launches a process with elevated privileges. This does not behave exactly |
// like LaunchProcess as it uses ShellExecuteEx instead of CreateProcess to |
// create the process. This means the process will have elevated privileges |
-// and thus some common operations like OpenProcess will fail. The process will |
-// be available through the |process_handle| argument. Currently the only |
-// supported LaunchOptions are |start_hidden| and |wait|. |
-BASE_EXPORT bool LaunchElevatedProcess(const CommandLine& cmdline, |
- const LaunchOptions& options, |
- ProcessHandle* process_handle); |
+// and thus some common operations like OpenProcess will fail. Currently the |
+// only supported LaunchOptions are |start_hidden| and |wait|. |
+BASE_EXPORT Process LaunchElevatedProcess(const CommandLine& cmdline, |
+ const LaunchOptions& options); |
#elif defined(OS_POSIX) |
// A POSIX-specific version of LaunchProcess that takes an argv array |