diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 21:38:02 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 21:38:02 +0000 |
commit | 89a5616f0bdd3842854f559de57ad84a13690210 (patch) | |
tree | 1c5dd24519c150c94936abfb2b6994067e7cae7c /chrome | |
parent | 5c8ee43d773ee0a1877db2e5dffc3e57a6873f67 (diff) | |
download | chromium_src-89a5616f0bdd3842854f559de57ad84a13690210.zip chromium_src-89a5616f0bdd3842854f559de57ad84a13690210.tar.gz chromium_src-89a5616f0bdd3842854f559de57ad84a13690210.tar.bz2 |
Convert the remaining callers of LaunchApp to LaunchProcess.
And delete temporary shims.
BUG=88990
Review URL: http://codereview.chromium.org/7386010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92897 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/first_run/upgrade_util_win.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/views/uninstall_view.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_content_client.cc | 4 | ||||
-rw-r--r-- | chrome/installer/setup/setup_main.cc | 2 | ||||
-rw-r--r-- | chrome/installer/test/alternate_version_generator.cc | 5 | ||||
-rw-r--r-- | chrome/installer/util/google_chrome_distribution.cc | 3 | ||||
-rw-r--r-- | chrome/test/mini_installer_test/chrome_mini_installer.cc | 20 | ||||
-rw-r--r-- | chrome/test/ui/ui_test_suite.cc | 6 |
8 files changed, 30 insertions, 19 deletions
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc index 3fa964c..59d4f08 100644 --- a/chrome/browser/first_run/upgrade_util_win.cc +++ b/chrome/browser/first_run/upgrade_util_win.cc @@ -124,7 +124,10 @@ bool SwapNewChromeExeIfPresent() { if (key.ReadValue(google_update::kRegRenameCmdField, &rename_cmd) == ERROR_SUCCESS) { base::ProcessHandle handle; - if (base::LaunchApp(rename_cmd, true, true, &handle)) { + base::LaunchOptions options; + options.wait = true; + options.start_hidden = true; + if (base::LaunchProcess(rename_cmd, options, &handle)) { DWORD exit_code; ::GetExitCodeProcess(handle, &exit_code); ::CloseHandle(handle); diff --git a/chrome/browser/ui/views/uninstall_view.cc b/chrome/browser/ui/views/uninstall_view.cc index f0a9928..e5098a0 100644 --- a/chrome/browser/ui/views/uninstall_view.cc +++ b/chrome/browser/ui/views/uninstall_view.cc @@ -104,7 +104,9 @@ bool UninstallView::Accept() { int index = browsers_combo_->selected_item(); BrowsersMap::const_iterator it = browsers_->begin(); std::advance(it, index); - base::LaunchApp((*it).second, false, true, NULL); + base::LaunchOptions options; + options.start_hidden = true; + base::LaunchProcess((*it).second, options, NULL); } return true; } diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc index 1295630..3dbb092c 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc @@ -227,7 +227,9 @@ bool LoadFlashBroker(const FilePath& plugin_path, CommandLine* cmd_line) { rundll.value().c_str(), short_path); base::ProcessHandle process; - if (!base::LaunchApp(cmd_final, false, true, &process)) + base::LaunchOptions options; + options.start_hidden = true; + if (!base::LaunchProcess(cmd_final, options, &process)) return false; cmd_line->AppendSwitchASCII("flash-broker", diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index ac57b66..7300c1e 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -504,7 +504,7 @@ bool CheckPreInstallConditions(const InstallationState& original_state, cmd.AppendSwitch(switches::kFirstRun); installer_state->WriteInstallerResult(*status, 0, NULL); VLOG(1) << "Launching existing system-level chrome instead."; - base::LaunchApp(cmd, false, false, NULL); + base::LaunchProcess(cmd, base::LaunchOptions(), NULL); } return false; } diff --git a/chrome/installer/test/alternate_version_generator.cc b/chrome/installer/test/alternate_version_generator.cc index 7af5cc6..0ba20d15a 100644 --- a/chrome/installer/test/alternate_version_generator.cc +++ b/chrome/installer/test/alternate_version_generator.cc @@ -195,7 +195,10 @@ bool RunProcessAndWait(const wchar_t* exe_path, const std::wstring& cmdline, int* exit_code) { bool result = true; base::ProcessHandle process; - if (base::LaunchApp(cmdline, true, true, &process)) { + base::LaunchOptions options; + options.wait = true; + options.start_hidden = true; + if (base::LaunchProcess(cmdline, options, &process)) { if (exit_code) { if (!GetExitCodeProcess(process, reinterpret_cast<DWORD*>(exit_code))) { diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index 11d2128..3570510 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -144,8 +144,7 @@ bool LaunchSetup(CommandLine cmd_line, bool system_level_toast) { } } - return base::LaunchApp(cmd_line.command_line_string(), - false, false, NULL); + return base::LaunchProcess(cmd_line, base::LaunchOptions(), NULL); } // For System level installs, setup.exe lives in the system temp, which diff --git a/chrome/test/mini_installer_test/chrome_mini_installer.cc b/chrome/test/mini_installer_test/chrome_mini_installer.cc index db0254b..5e94dcd 100644 --- a/chrome/test/mini_installer_test/chrome_mini_installer.cc +++ b/chrome/test/mini_installer_test/chrome_mini_installer.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -157,7 +157,9 @@ void ChromeMiniInstaller::InstallStandaloneInstaller() { std::wstring tag_installer_command; ASSERT_TRUE(MiniInstallerTestUtil::GetCommandForTagging( &tag_installer_command)); - base::LaunchApp(tag_installer_command, true, false, NULL); + base::LaunchOptions options; + options.wait = true; + base::LaunchProcess(tag_installer_command, options, NULL); std::wstring installer_path = MiniInstallerTestUtil::GetFilePath( mini_installer_constants::kStandaloneInstaller); InstallMiniInstaller(false, installer_path); @@ -276,7 +278,7 @@ void ChromeMiniInstaller::UnInstall() { uninstall_args = uninstall_args + L" --system-level"; base::ProcessHandle setup_handle; - base::LaunchApp(uninstall_args, false, false, &setup_handle); + base::LaunchProcess(uninstall_args, base::LaunchOptions(), &setup_handle); if (is_chrome_frame_) ASSERT_TRUE(CloseUninstallWindow()); @@ -323,7 +325,7 @@ void ChromeMiniInstaller::UnInstallChromeFrameWithIERunning() { uninstall_args = uninstall_args + L" --system-level"; base::ProcessHandle setup_handle; - base::LaunchApp(uninstall_args, false, false, &setup_handle); + base::LaunchProcess(uninstall_args, base::LaunchOptions(), &setup_handle); ASSERT_TRUE(CloseUninstallWindow()); ASSERT_TRUE(MiniInstallerTestUtil::VerifyProcessHandleClosed(setup_handle)); @@ -602,8 +604,8 @@ void ChromeMiniInstaller::LaunchInstaller(const std::wstring& path, } base::ProcessHandle app_handle; - base::LaunchApp(L"\"" + path + L"\"" + launch_args, false, false, - &app_handle); + base::LaunchProcess(L"\"" + path + L"\"" + launch_args, base::LaunchOptions(), + &app_handle); printf("Waiting while this process is running %ls ....\n", process_name); MiniInstallerTestUtil::VerifyProcessLaunch(process_name, true); @@ -691,7 +693,7 @@ void ChromeMiniInstaller::LaunchIE(const std::wstring& navigate_url) { CommandLine cmd_line(browser_path); cmd_line.AppendArgNative(navigate_url); - base::LaunchApp(cmd_line, false, false, NULL); + base::LaunchProcess(cmd_line, base::LaunchOptions(), NULL); } // This method will launch any requested browser. @@ -699,8 +701,8 @@ void ChromeMiniInstaller::LaunchBrowser(const std::wstring& launch_path, const std::wstring& launch_args, const std::wstring& process_name, bool expected_status) { - base::LaunchApp(L"\"" + launch_path + L"\"" + L" " + launch_args, - false, false, NULL); + base::LaunchProcess(L"\"" + launch_path + L"\"" + L" " + launch_args, + base::LaunchOptions(), NULL); base::PlatformThread::Sleep(1000); MiniInstallerTestUtil::VerifyProcessLaunch(process_name.c_str(), expected_status); diff --git a/chrome/test/ui/ui_test_suite.cc b/chrome/test/ui/ui_test_suite.cc index 36968c5..2570352 100644 --- a/chrome/test/ui/ui_test_suite.cc +++ b/chrome/test/ui/ui_test_suite.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -117,8 +117,8 @@ void UITestSuite::LoadCrashService() { } FilePath crash_service = exe_dir.Append(L"crash_service.exe"); - if (!base::LaunchApp(crash_service.value(), false, false, - &crash_service_)) { + if (!base::LaunchProcess(crash_service.value(), base::LaunchOptions(), + &crash_service_)) { printf("Couldn't start crash_service.exe, so this ui_test run won't tell " \ "you if any test crashes!\n"); return; |