summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-15 16:47:02 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-15 16:47:02 +0000
commite599218171e942749da5c8b3931b091655c1b74c (patch)
tree703ee7f0427e0bafabb1402e678c40c31acec38e /content/browser
parent24ea7da0968595f5365a537fba548e9163f1f371 (diff)
downloadchromium_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 'content/browser')
-rw-r--r--content/browser/child_process_launcher.cc3
-rw-r--r--content/browser/zygote_host_linux.cc9
2 files changed, 5 insertions, 7 deletions
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index 4b49369..7bb603f 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -174,8 +174,7 @@ class ChildProcessLauncher::Context
base::LaunchOptions options;
options.environ = &env;
options.fds_to_remap = &fds_to_map;
- options.process_handle = &handle;
- launched = base::LaunchProcess(*cmd_line, options);
+ launched = base::LaunchProcess(*cmd_line, options, &handle);
#if defined(OS_MACOSX)
if (launched)
diff --git a/content/browser/zygote_host_linux.cc b/content/browser/zygote_host_linux.cc
index fb5da59..955628d 100644
--- a/content/browser/zygote_host_linux.cc
+++ b/content/browser/zygote_host_linux.cc
@@ -151,9 +151,8 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) {
base::ProcessHandle process = -1;
base::LaunchOptions options;
- options.process_handle = &process;
options.fds_to_remap = &fds_to_map;
- base::LaunchProcess(cmd_line.argv(), options);
+ base::LaunchProcess(cmd_line.argv(), options, &process);
CHECK(process != -1) << "Failed to launch zygote process";
if (using_suid_sandbox_) {
@@ -305,10 +304,10 @@ void ZygoteHost::AdjustRendererOOMScore(base::ProcessHandle pid, int score) {
adj_oom_score_cmdline.push_back(base::IntToString(score));
base::ProcessHandle sandbox_helper_process;
- base::LaunchOptions options;
- options.process_handle = &sandbox_helper_process;
- if (base::LaunchProcess(adj_oom_score_cmdline, options))
+ if (base::LaunchProcess(adj_oom_score_cmdline, base::LaunchOptions(),
+ &sandbox_helper_process)) {
ProcessWatcher::EnsureProcessGetsReaped(sandbox_helper_process);
+ }
} else if (!using_suid_sandbox_) {
if (!base::AdjustOOMScore(pid, score))
PLOG(ERROR) << "Failed to adjust OOM score of renderer with pid " << pid;