summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorrvargas <rvargas@chromium.org>2015-01-09 16:46:12 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-10 00:47:10 +0000
commit02a9986ca1c0485ca8837e976c7f36e21437109b (patch)
tree76c6b6083d74966d8861272f083aa936b533527b /base
parent0e50453dd367a6e8ce82d0efdc7ab0dc8a71dbb9 (diff)
downloadchromium_src-02a9986ca1c0485ca8837e976c7f36e21437109b.zip
chromium_src-02a9986ca1c0485ca8837e976c7f36e21437109b.tar.gz
chromium_src-02a9986ca1c0485ca8837e976c7f36e21437109b.tar.bz2
Add the new version for the POSIX-specific version of LaunchProcess.
The old version will be removed once all consumers are updated. BUG=417532 Review URL: https://codereview.chromium.org/827493004 Cr-Commit-Position: refs/heads/master@{#310924}
Diffstat (limited to 'base')
-rw-r--r--base/process/launch.h5
-rw-r--r--base/process/launch_posix.cc9
2 files changed, 14 insertions, 0 deletions
diff --git a/base/process/launch.h b/base/process/launch.h
index 0450ddf..6cd02d6 100644
--- a/base/process/launch.h
+++ b/base/process/launch.h
@@ -189,6 +189,11 @@ BASE_EXPORT Process LaunchElevatedProcess(const CommandLine& cmdline,
// instead of a CommandLine. Useful for situations where you need to
// control the command line arguments directly, but prefer the
// CommandLine version if launching Chrome itself.
+BASE_EXPORT Process LaunchProcess(const std::vector<std::string>& argv,
+ const LaunchOptions& options);
+
+// Deprecated version.
+// TODO(rvargas) crbug.com/417532: Remove this after migrating all consumers.
BASE_EXPORT bool LaunchProcess(const std::vector<std::string>& argv,
const LaunchOptions& options,
ProcessHandle* process_handle);
diff --git a/base/process/launch_posix.cc b/base/process/launch_posix.cc
index 3322d26..c60cfdc 100644
--- a/base/process/launch_posix.cc
+++ b/base/process/launch_posix.cc
@@ -473,6 +473,15 @@ bool LaunchProcess(const std::vector<std::string>& argv,
return true;
}
+Process LaunchProcess(const std::vector<std::string>& argv,
+ const LaunchOptions& options) {
+ ProcessHandle process_handle;
+ if (LaunchProcess(argv, options, &process_handle))
+ return Process(process_handle);
+
+ return Process();
+}
+
bool LaunchProcess(const CommandLine& cmdline,
const LaunchOptions& options,