diff options
Diffstat (limited to 'chrome')
29 files changed, 34 insertions, 61 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 6db9e6e..78d5ab4 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -926,7 +926,7 @@ Profile* CreateProfile(const MainFunctionParams& parameters, CommandLine new_command_line = parameters.command_line_; new_command_line.AppendSwitchPath(switches::kUserDataDir, new_user_data_dir); - base::LaunchProcess(new_command_line, base::LaunchOptions()); + base::LaunchProcess(new_command_line, base::LaunchOptions(), NULL); } #else // TODO(port): fix this. See comments near the definition of diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc index 0cb0441..3611b21 100644 --- a/chrome/browser/browser_main_win.cc +++ b/chrome/browser/browser_main_win.cc @@ -266,7 +266,7 @@ bool CheckMachineLevelInstall() { uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall); uninstall_cmd.AppendSwitch( installer::switches::kDoNotRemoveSharedItems); - base::LaunchProcess(uninstall_cmd, base::LaunchOptions()); + base::LaunchProcess(uninstall_cmd, base::LaunchOptions(), NULL); } return true; } diff --git a/chrome/browser/chromeos/input_method/input_method_manager.cc b/chrome/browser/chromeos/input_method/input_method_manager.cc index 6270612..f84fb9a 100644 --- a/chrome/browser/chromeos/input_method/input_method_manager.cc +++ b/chrome/browser/chromeos/input_method/input_method_manager.cc @@ -762,9 +762,7 @@ class InputMethodManagerImpl : public InputMethodManager, // TODO(zork): export "LD_PRELOAD=/usr/lib/libcrash.so" base::SplitString(command_line, ' ', &argv); - base::LaunchOptions options; - options.process_handle = &handle; - if (!base::LaunchProcess(argv, options)) { + if (!base::LaunchProcess(argv, base::LaunchOptions(), &handle)) { LOG(ERROR) << "Could not launch: " << command_line; return false; } diff --git a/chrome/browser/chromeos/input_method/xkeyboard.cc b/chrome/browser/chromeos/input_method/xkeyboard.cc index ef3245f..60b44e4 100644 --- a/chrome/browser/chromeos/input_method/xkeyboard.cc +++ b/chrome/browser/chromeos/input_method/xkeyboard.cc @@ -282,9 +282,7 @@ class XKeyboard { argv.push_back(layout_to_set); argv.push_back("-synch"); - base::LaunchOptions options; - options.process_handle = &handle; - if (!base::LaunchProcess(argv, options)) { + if (!base::LaunchProcess(argv, base::LaunchOptions(), &handle)) { LOG(ERROR) << "Failed to execute setxkbmap: " << layout_to_set; execute_queue_ = std::queue<std::string>(); // clear the queue. return; diff --git a/chrome/browser/chromeos/system/touchpad_settings.cc b/chrome/browser/chromeos/system/touchpad_settings.cc index e7d2989..af34a2c 100644 --- a/chrome/browser/chromeos/system/touchpad_settings.cc +++ b/chrome/browser/chromeos/system/touchpad_settings.cc @@ -36,7 +36,7 @@ void SetSensitivity(int value) { base::LaunchOptions options; options.wait = false; // Launch asynchronously. - base::LaunchProcess(CommandLine(argv), options); + base::LaunchProcess(CommandLine(argv), options, NULL); } void SetTapToClick(bool enabled) { @@ -56,7 +56,7 @@ void SetTapToClick(bool enabled) { base::LaunchOptions options; options.wait = false; // Launch asynchronously. - base::LaunchProcess(CommandLine(argv), options); + base::LaunchProcess(CommandLine(argv), options, NULL); } } // namespace touchpad_settings diff --git a/chrome/browser/first_run/first_run_gtk.cc b/chrome/browser/first_run/first_run_gtk.cc index 9051456..bb79830 100644 --- a/chrome/browser/first_run/first_run_gtk.cc +++ b/chrome/browser/first_run/first_run_gtk.cc @@ -43,7 +43,7 @@ bool FirstRun::ImportBookmarks(const FilePath& import_bookmarks_path) { // for the process to return. base::LaunchOptions options; options.wait = true; - return base::LaunchProcess(import_cmd, options); + return base::LaunchProcess(import_cmd, options, NULL); } // static diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc index 3d0eb3f..2a62ad7 100644 --- a/chrome/browser/first_run/first_run_win.cc +++ b/chrome/browser/first_run/first_run_win.cc @@ -145,9 +145,8 @@ bool FirstRun::LaunchSetupWithParam(const std::string& param, cl.AppendSwitch(switches::kChromeFrame); } - base::LaunchOptions options; - options.process_handle = &ph; - if (!base::LaunchProcess(cl, options)) + // TODO(evan): should this use options.wait = true? + if (!base::LaunchProcess(cl, base::LaunchOptions(), &ph)) return false; DWORD wr = ::WaitForSingleObject(ph, INFINITE); if (wr != WAIT_OBJECT_0) @@ -344,9 +343,7 @@ bool FirstRun::ImportSettings(Profile* profile, // Time to launch the process that is going to do the import. base::ProcessHandle import_process; - base::LaunchOptions options; - options.process_handle = &import_process; - if (!base::LaunchProcess(import_cmd, options)) + if (!base::LaunchProcess(import_cmd, base::LaunchOptions(), &import_process)) return false; // We block inside the import_runner ctor, pumping messages until the diff --git a/chrome/browser/first_run/upgrade_util_linux.cc b/chrome/browser/first_run/upgrade_util_linux.cc index cf6bc21..62aacf4 100644 --- a/chrome/browser/first_run/upgrade_util_linux.cc +++ b/chrome/browser/first_run/upgrade_util_linux.cc @@ -23,8 +23,7 @@ double saved_last_modified_time_of_exe = 0; namespace upgrade_util { bool RelaunchChromeBrowser(const CommandLine& command_line) { - base::LaunchOptions options; - return base::LaunchProcess(command_line, options); + return base::LaunchProcess(command_line, base::LaunchOptions(), NULL); } bool IsUpdatePendingRestart() { diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc index e9ee00e..9be8143 100644 --- a/chrome/browser/first_run/upgrade_util_win.cc +++ b/chrome/browser/first_run/upgrade_util_win.cc @@ -64,7 +64,7 @@ namespace upgrade_util { bool RelaunchChromeBrowser(const CommandLine& command_line) { scoped_ptr<base::Environment> env(base::Environment::Create()); env->UnSetVar(chrome::kChromeVersionEnvVar); - return base::LaunchProcess(command_line, base::LaunchOptions()); + return base::LaunchProcess(command_line, base::LaunchOptions(), NULL); } bool IsUpdatePendingRestart() { diff --git a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc index f89c297..09a29a4 100644 --- a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc +++ b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc @@ -57,8 +57,7 @@ bool LaunchNSSDecrypterChildProcess(const FilePath& nss_path, options.environ = &env; options.fds_to_remap = &fds_to_map; options.wait = debug_on_start; - options.process_handle = handle; - return base::LaunchProcess(cl.argv(), options); + return base::LaunchProcess(cl.argv(), options, handle); } } // namespace diff --git a/chrome/browser/mac/relauncher.cc b/chrome/browser/mac/relauncher.cc index 07f8e79..d5ce323 100644 --- a/chrome/browser/mac/relauncher.cc +++ b/chrome/browser/mac/relauncher.cc @@ -155,7 +155,7 @@ bool RelaunchAppWithHelper(const std::string& helper, base::LaunchOptions options; options.fds_to_remap = &fd_map; - if (!base::LaunchProcess(relaunch_args, options)) { + if (!base::LaunchProcess(relaunch_args, options, NULL)) { LOG(ERROR) << "base::LaunchProcess failed"; return false; } diff --git a/chrome/browser/platform_util_linux.cc b/chrome/browser/platform_util_linux.cc index eb1dbc9..e93cc0f 100644 --- a/chrome/browser/platform_util_linux.cc +++ b/chrome/browser/platform_util_linux.cc @@ -35,12 +35,10 @@ void XDGUtil(const std::string& util, const std::string& arg) { env.push_back(std::make_pair("GNOME_DISABLE_CRASH_DIALOG", "")); } - base::file_handle_mapping_vector no_files; base::ProcessHandle handle; base::LaunchOptions options; - options.process_handle = &handle; options.environ = &env; - if (base::LaunchProcess(argv, options)) + if (base::LaunchProcess(argv, options, &handle)) ProcessWatcher::EnsureProcessGetsReaped(handle); } diff --git a/chrome/browser/printing/printer_manager_dialog_linux.cc b/chrome/browser/printing/printer_manager_dialog_linux.cc index 02b262c..031d1e9 100644 --- a/chrome/browser/printing/printer_manager_dialog_linux.cc +++ b/chrome/browser/printing/printer_manager_dialog_linux.cc @@ -47,10 +47,8 @@ void DetectAndOpenPrinterConfigDialog() { std::vector<std::string> argv; argv.push_back(command); - base::LaunchOptions options; base::ProcessHandle handle; - options.process_handle = &handle; - if (!base::LaunchProcess(argv, options)) { + if (!base::LaunchProcess(argv, base::LaunchOptions(), &handle)) { LOG(ERROR) << "Failed to open printer manager dialog "; return; } diff --git a/chrome/browser/process_info_snapshot_mac_unittest.cc b/chrome/browser/process_info_snapshot_mac_unittest.cc index 226aadc3..0ddbda4 100644 --- a/chrome/browser/process_info_snapshot_mac_unittest.cc +++ b/chrome/browser/process_info_snapshot_mac_unittest.cc @@ -113,8 +113,7 @@ TEST_F(ProcessInfoSnapshotMacTest, EffectiveVsRealUserIDTest) { base::ProcessHandle process_handle; base::LaunchOptions options; options.fds_to_remap = &fds_to_remap; - options.process_handle = &process_handle; - ASSERT_TRUE(base::LaunchProcess(argv, options)); + ASSERT_TRUE(base::LaunchProcess(argv, options, &process_handle)); PCHECK(HANDLE_EINTR(close(fds[1])) == 0); // Wait until there's some output form top. This is an easy way to tell that diff --git a/chrome/browser/process_singleton_uitest.cc b/chrome/browser/process_singleton_uitest.cc index d546b9f..386d748 100644 --- a/chrome/browser/process_singleton_uitest.cc +++ b/chrome/browser/process_singleton_uitest.cc @@ -97,9 +97,7 @@ class ChromeStarter : public base::RefCountedThreadSafe<ChromeStarter> { // Here we don't wait for the app to be terminated because one of the // process will stay alive while the others will be restarted. If we would // wait here, we would never get a handle to the main process... - base::LaunchOptions options; - options.process_handle = &process_handle_; - base::LaunchProcess(command_line, options); + base::LaunchProcess(command_line, base::LaunchOptions(), &process_handle_); ASSERT_NE(base::kNullProcessHandle, process_handle_); // We can wait on the handle here, we should get stuck on one and only diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc index 998fcb1..9ee6b9a 100644 --- a/chrome/browser/safe_browsing/safe_browsing_test.cc +++ b/chrome/browser/safe_browsing/safe_browsing_test.cc @@ -149,8 +149,7 @@ class SafeBrowsingTestServer { #if defined(OS_WIN) options.start_hidden = true; #endif - options.process_handle = &server_handle_; - if (!base::LaunchProcess(cmd_line, options)) { + if (!base::LaunchProcess(cmd_line, options, &server_handle_)) { LOG(ERROR) << "Failed to launch server: " << cmd_line.command_line_string(); return false; diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc index 831f7e3..71c75f3 100644 --- a/chrome/browser/service/service_process_control.cc +++ b/chrome/browser/service/service_process_control.cc @@ -316,7 +316,7 @@ void ServiceProcessControl::Launcher::DoRun() { #if defined(OS_WIN) options.start_hidden = true; #endif - if (base::LaunchProcess(*cmd_line_, options)) { + if (base::LaunchProcess(*cmd_line_, options, NULL)) { BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, NewRunnableMethod(this, &Launcher::DoDetectLaunched)); diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc index 95a304f..cb8b45b 100644 --- a/chrome/browser/shell_integration_linux.cc +++ b/chrome/browser/shell_integration_linux.cc @@ -59,9 +59,8 @@ bool LaunchXdgUtility(const std::vector<std::string>& argv, int* exit_code) { base::ProcessHandle handle; base::LaunchOptions options; - options.process_handle = &handle; options.fds_to_remap = &no_stdin; - if (!base::LaunchProcess(argv, options)) { + if (!base::LaunchProcess(argv, options, &handle)) { close(devnull); return false; } diff --git a/chrome/browser/ui/webui/options/advanced_options_utils_gtk.cc b/chrome/browser/ui/webui/options/advanced_options_utils_gtk.cc index 6f267a6..2f26747 100644 --- a/chrome/browser/ui/webui/options/advanced_options_utils_gtk.cc +++ b/chrome/browser/ui/webui/options/advanced_options_utils_gtk.cc @@ -75,9 +75,7 @@ bool StartProxyConfigUtil(TabContents* tab_contents, const char* command[]) { for (size_t i = 0; command[i]; ++i) argv.push_back(command[i]); base::ProcessHandle handle; - base::LaunchOptions options; - options.process_handle = &handle; - if (!base::LaunchProcess(argv, options)) { + if (!base::LaunchProcess(argv, base::LaunchOptions(), &handle)) { LOG(ERROR) << "StartProxyConfigUtil failed to start " << command[0]; return false; } diff --git a/chrome/common/launchd_mac.mm b/chrome/common/launchd_mac.mm index f5a5f20..7d28390 100644 --- a/chrome/common/launchd_mac.mm +++ b/chrome/common/launchd_mac.mm @@ -132,7 +132,7 @@ bool Launchd::RestartJob(Domain domain, base::LaunchOptions options; options.new_process_group = true; - return base::LaunchProcess(argv, options); + return base::LaunchProcess(argv, options, NULL); } CFMutableDictionaryRef Launchd::CreatePlistFromFile(Domain domain, diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index c6abe6f..11d2128 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -803,6 +803,6 @@ void GoogleChromeDistribution::InactiveUserToastExperiment(int flavor, CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, GetType())); - base::LaunchProcess(cmd, base::LaunchOptions()); + base::LaunchProcess(cmd, base::LaunchOptions(), NULL); } #endif diff --git a/chrome/installer/util/product.cc b/chrome/installer/util/product.cc index 6d3d44d..eb5286d 100644 --- a/chrome/installer/util/product.cc +++ b/chrome/installer/util/product.cc @@ -62,8 +62,7 @@ bool Product::LaunchChrome(const FilePath& application_path) const { bool success = !application_path.empty(); if (success) { CommandLine cmd(application_path.Append(installer::kChromeExe)); - base::LaunchOptions options; - success = base::LaunchProcess(cmd, options); + success = base::LaunchProcess(cmd, base::LaunchOptions(), NULL); } return success; } diff --git a/chrome/service/cloud_print/cloud_print_proxy.cc b/chrome/service/cloud_print/cloud_print_proxy.cc index 17e8d35..2e02aa3 100644 --- a/chrome/service/cloud_print/cloud_print_proxy.cc +++ b/chrome/service/cloud_print/cloud_print_proxy.cc @@ -38,8 +38,7 @@ static void ShowTokenExpiredNotificationInBrowser() { cmd_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir); cmd_line.AppendSwitch(switches::kNotifyCloudPrintTokenExpired); - base::LaunchOptions options; - base::LaunchProcess(cmd_line, options); + base::LaunchProcess(cmd_line, base::LaunchOptions(), NULL); } CloudPrintProxy::CloudPrintProxy() diff --git a/chrome/service/service_child_process_host.cc b/chrome/service/service_child_process_host.cc index 00f96df..d111e90 100644 --- a/chrome/service/service_child_process_host.cc +++ b/chrome/service/service_child_process_host.cc @@ -36,9 +36,7 @@ bool ServiceChildProcessHost::Launch(CommandLine* cmd_line, if (no_sandbox) { base::ProcessHandle process = base::kNullProcessHandle; cmd_line->AppendSwitch(switches::kNoSandbox); - base::LaunchOptions options; - options.process_handle = &process; - base::LaunchProcess(*cmd_line, options); + base::LaunchProcess(*cmd_line, base::LaunchOptions(), &process); set_handle(process); } else { set_handle(sandbox::StartProcessWithAccess(cmd_line, exposed_dir)); diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc index ad75064..052e510 100644 --- a/chrome/test/automation/proxy_launcher.cc +++ b/chrome/test/automation/proxy_launcher.cc @@ -442,7 +442,6 @@ bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state, bool wait, base::LaunchOptions options; options.wait = wait; - options.process_handle = process; #if defined(OS_WIN) options.start_hidden = !state.show_window; @@ -464,7 +463,7 @@ bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state, bool wait, options.fds_to_remap = &fds; #endif - return base::LaunchProcess(command_line, options); + return base::LaunchProcess(command_line, options, process); } AutomationProxy* ProxyLauncher::automation() const { diff --git a/chrome/test/layout_test_http_server.cc b/chrome/test/layout_test_http_server.cc index 34c79ab..b1ad42e 100644 --- a/chrome/test/layout_test_http_server.cc +++ b/chrome/test/layout_test_http_server.cc @@ -87,7 +87,7 @@ bool LayoutTestHttpServer::Start() { // continuing. base::LaunchOptions options; options.wait = true; - running_ = base::LaunchProcess(cmd_line, options); + running_ = base::LaunchProcess(cmd_line, options, NULL); return running_; } @@ -104,7 +104,7 @@ bool LayoutTestHttpServer::Stop() { base::LaunchOptions options; options.wait = true; - bool stopped = base::LaunchProcess(cmd_line, options); + bool stopped = base::LaunchProcess(cmd_line, options, NULL); running_ = !stopped; return stopped; } diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc index 920c89b..a47d67f 100644 --- a/chrome/test/live_sync/live_sync_test.cc +++ b/chrome/test/live_sync/live_sync_test.cc @@ -410,8 +410,7 @@ bool LiveSyncTest::SetUpLocalTestServer() { #if defined(OS_WIN) options.start_hidden = true; #endif - options.process_handle = &test_server_handle_; - if (!base::LaunchProcess(server_cmdline, options)) + if (!base::LaunchProcess(server_cmdline, options, &test_server_handle_)) LOG(ERROR) << "Could not launch local test server."; const int kMaxWaitTime = TestTimeouts::live_operation_timeout_ms(); diff --git a/chrome/test/out_of_proc_test_runner.cc b/chrome/test/out_of_proc_test_runner.cc index 9b230ba..94ff0d5 100644 --- a/chrome/test/out_of_proc_test_runner.cc +++ b/chrome/test/out_of_proc_test_runner.cc @@ -354,7 +354,6 @@ int RunTest(const std::string& test_name, int default_timeout_ms) { base::ProcessHandle process_handle; base::LaunchOptions options; - options.process_handle = &process_handle; #if defined(OS_POSIX) const char* browser_wrapper = getenv("BROWSER_WRAPPER"); @@ -371,7 +370,7 @@ int RunTest(const std::string& test_name, int default_timeout_ms) { options.new_process_group = true; #endif - if (!base::LaunchProcess(new_cmd_line, options)) + if (!base::LaunchProcess(new_cmd_line, options, &process_handle)) return false; int timeout_ms = diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc index bc6733d..4031dfb 100644 --- a/chrome/test/ui_test_utils.cc +++ b/chrome/test/ui_test_utils.cc @@ -780,7 +780,7 @@ bool TestWebSocketServer::Start(const FilePath& root_directory) { SetPythonPath(); base::LaunchOptions options; options.wait = true; - if (!base::LaunchProcess(*cmd_line.get(), options)) { + if (!base::LaunchProcess(*cmd_line.get(), options, NULL)) { LOG(ERROR) << "Unable to launch websocket server."; return false; } @@ -834,7 +834,7 @@ TestWebSocketServer::~TestWebSocketServer() { websocket_pid_file_.value()); base::LaunchOptions options; options.wait = true; - base::LaunchProcess(*cmd_line.get(), options); + base::LaunchProcess(*cmd_line.get(), options, NULL); } TestNotificationObserver::TestNotificationObserver() |