diff options
Diffstat (limited to 'chrome/browser')
7 files changed, 27 insertions, 21 deletions
diff --git a/chrome/browser/chromeos/input_method/input_method_manager.cc b/chrome/browser/chromeos/input_method/input_method_manager.cc index da81d24..6270612 100644 --- a/chrome/browser/chromeos/input_method/input_method_manager.cc +++ b/chrome/browser/chromeos/input_method/input_method_manager.cc @@ -757,16 +757,14 @@ class InputMethodManagerImpl : public InputMethodManager, bool LaunchInputMethodProcess(const std::string& command_line, base::ProcessHandle* process_handle) { std::vector<std::string> argv; - base::file_handle_mapping_vector fds_to_remap; base::ProcessHandle handle = base::kNullProcessHandle; // TODO(zork): export "LD_PRELOAD=/usr/lib/libcrash.so" base::SplitString(command_line, ' ', &argv); - const bool result = base::LaunchApp(argv, - fds_to_remap, // no remapping - false, // wait - &handle); - if (!result) { + + base::LaunchOptions options; + options.process_handle = &handle; + if (!base::LaunchProcess(argv, options)) { 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 6f35df2..9def5e8 100644 --- a/chrome/browser/chromeos/input_method/xkeyboard.cc +++ b/chrome/browser/chromeos/input_method/xkeyboard.cc @@ -279,18 +279,16 @@ class XKeyboard { const std::string layout_to_set = execute_queue_.front(); std::vector<std::string> argv; - base::file_handle_mapping_vector fds_to_remap; base::ProcessHandle handle = base::kNullProcessHandle; argv.push_back(kSetxkbmapCommand); argv.push_back("-layout"); argv.push_back(layout_to_set); argv.push_back("-synch"); - const bool result = base::LaunchApp(argv, - fds_to_remap, // No remapping. - false, // Don't wait. - &handle); - if (!result) { + + base::LaunchOptions options; + options.process_handle = &handle; + if (!base::LaunchProcess(argv, options)) { LOG(ERROR) << "Failed to execute setxkbmap: " << layout_to_set; execute_queue_ = std::queue<std::string>(); // clear the queue. return; diff --git a/chrome/browser/mac/relauncher.cc b/chrome/browser/mac/relauncher.cc index 9594403..07f8e79 100644 --- a/chrome/browser/mac/relauncher.cc +++ b/chrome/browser/mac/relauncher.cc @@ -153,8 +153,10 @@ bool RelaunchAppWithHelper(const std::string& helper, base::file_handle_mapping_vector fd_map; fd_map.push_back(std::make_pair(*pipe_write_fd, kRelauncherSyncFD)); - if (!base::LaunchApp(relaunch_args, fd_map, false, NULL)) { - LOG(ERROR) << "base::LaunchApp failed"; + base::LaunchOptions options; + options.fds_to_remap = &fd_map; + if (!base::LaunchProcess(relaunch_args, options)) { + LOG(ERROR) << "base::LaunchProcess failed"; return false; } diff --git a/chrome/browser/printing/printer_manager_dialog_linux.cc b/chrome/browser/printing/printer_manager_dialog_linux.cc index 61cea9d..02b262c 100644 --- a/chrome/browser/printing/printer_manager_dialog_linux.cc +++ b/chrome/browser/printing/printer_manager_dialog_linux.cc @@ -47,9 +47,10 @@ void DetectAndOpenPrinterConfigDialog() { std::vector<std::string> argv; argv.push_back(command); - base::file_handle_mapping_vector no_files; + base::LaunchOptions options; base::ProcessHandle handle; - if (!base::LaunchApp(argv, no_files, false, &handle)) { + options.process_handle = &handle; + if (!base::LaunchProcess(argv, options)) { 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 64d1c84..226aadc3 100644 --- a/chrome/browser/process_info_snapshot_mac_unittest.cc +++ b/chrome/browser/process_info_snapshot_mac_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -111,7 +111,10 @@ TEST_F(ProcessInfoSnapshotMacTest, EffectiveVsRealUserIDTest) { argv.push_back("0"); base::ProcessHandle process_handle; - ASSERT_TRUE(base::LaunchApp(argv, fds_to_remap, false, &process_handle)); + base::LaunchOptions options; + options.fds_to_remap = &fds_to_remap; + options.process_handle = &process_handle; + ASSERT_TRUE(base::LaunchProcess(argv, options)); 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/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc index 40257a5..43d6e68 100644 --- a/chrome/browser/shell_integration_linux.cc +++ b/chrome/browser/shell_integration_linux.cc @@ -58,7 +58,10 @@ bool LaunchXdgUtility(const std::vector<std::string>& argv, int* exit_code) { no_stdin.push_back(std::make_pair(devnull, STDIN_FILENO)); base::ProcessHandle handle; - if (!base::LaunchApp(argv, no_stdin, false, &handle)) { + base::LaunchOptions options; + options.process_handle = &handle; + options.fds_to_remap = &no_stdin; + if (!base::LaunchProcess(argv, options)) { 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 b55454d..6f267a6 100644 --- a/chrome/browser/ui/webui/options/advanced_options_utils_gtk.cc +++ b/chrome/browser/ui/webui/options/advanced_options_utils_gtk.cc @@ -74,9 +74,10 @@ bool StartProxyConfigUtil(TabContents* tab_contents, const char* command[]) { std::vector<std::string> argv; for (size_t i = 0; command[i]; ++i) argv.push_back(command[i]); - base::file_handle_mapping_vector no_files; base::ProcessHandle handle; - if (!base::LaunchApp(argv, no_files, false, &handle)) { + base::LaunchOptions options; + options.process_handle = &handle; + if (!base::LaunchProcess(argv, options)) { LOG(ERROR) << "StartProxyConfigUtil failed to start " << command[0]; return false; } |