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 /chrome_frame | |
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 'chrome_frame')
-rw-r--r-- | chrome_frame/ready_mode/internal/registry_ready_mode_state.cc | 3 | ||||
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.cc | 17 |
2 files changed, 6 insertions, 14 deletions
diff --git a/chrome_frame/ready_mode/internal/registry_ready_mode_state.cc b/chrome_frame/ready_mode/internal/registry_ready_mode_state.cc index 8e5f183..7700594 100644 --- a/chrome_frame/ready_mode/internal/registry_ready_mode_state.cc +++ b/chrome_frame/ready_mode/internal/registry_ready_mode_state.cc @@ -62,8 +62,7 @@ HANDLE LaunchCommandViaProcessLauncher(const std::wstring& command_field) { if (command_line != NULL) { base::LaunchOptions options; options.start_hidden = true; - options.process_handle = &launched_process; - base::LaunchProcess(*command_line, options); + base::LaunchProcess(*command_line, options, &launched_process); } return launched_process; diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc index 397a07b..240cec2 100644 --- a/chrome_frame/test/chrome_frame_test_utils.cc +++ b/chrome_frame/test/chrome_frame_test_utils.cc @@ -159,18 +159,14 @@ base::ProcessHandle LaunchExecutable(const std::wstring& executable, LOG(ERROR) << "Failed to find executable: " << executable; } else { CommandLine cmdline = CommandLine::FromString(path); - base::LaunchOptions options; - options.process_handle = &process; - if (!base::LaunchProcess(cmdline, options)) { + if (!base::LaunchProcess(cmdline, base::LaunchOptions(), &process)) { LOG(ERROR) << "LaunchProcess failed: " << ::GetLastError(); } } } else { CommandLine cmdline((FilePath(path))); cmdline.AppendArgNative(argument); - base::LaunchOptions options; - options.process_handle = &process; - if (!base::LaunchProcess(cmdline, options)) { + if (!base::LaunchProcess(cmdline, base::LaunchOptions(), &process)) { LOG(ERROR) << "LaunchProcess failed: " << ::GetLastError(); } } @@ -187,9 +183,7 @@ base::ProcessHandle LaunchChrome(const std::wstring& url) { cmd.AppendArgNative(url); base::ProcessHandle process = NULL; - base::LaunchOptions options; - options.process_handle = &process; - base::LaunchProcess(cmd, options); + base::LaunchProcess(cmd, base::LaunchOptions(), &process); return process; } @@ -596,9 +590,8 @@ base::ProcessHandle StartCrashService() { DVLOG(1) << "Starting crash_service.exe so you know if a test crashes!"; FilePath crash_service_path = exe_dir.AppendASCII("crash_service.exe"); - base::LaunchOptions options; - options.process_handle = &crash_service; - if (!base::LaunchProcess(crash_service_path.value(), options)) { + if (!base::LaunchProcess(crash_service_path.value(), base::LaunchOptions(), + &crash_service)) { DLOG(ERROR) << "Couldn't start crash_service.exe"; return NULL; } |