diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-24 04:40:20 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-24 04:40:20 +0000 |
commit | a82af39780861fe06a8682791a0ac477fb167531 (patch) | |
tree | cca259d368103813583118654c37da99ab8fb6b0 /chrome | |
parent | fd170bb31f6438e7472d76805aa67cb9d409aa55 (diff) | |
download | chromium_src-a82af39780861fe06a8682791a0ac477fb167531.zip chromium_src-a82af39780861fe06a8682791a0ac477fb167531.tar.gz chromium_src-a82af39780861fe06a8682791a0ac477fb167531.tar.bz2 |
Cleanup: Remove base::environment_vector and base::file_handle_mapping_vector to StudlyCaps.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9429039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
13 files changed, 38 insertions, 29 deletions
diff --git a/chrome/app/nacl_fork_delegate_linux.cc b/chrome/app/nacl_fork_delegate_linux.cc index 937f690..5ea4dd8 100644 --- a/chrome/app/nacl_fork_delegate_linux.cc +++ b/chrome/app/nacl_fork_delegate_linux.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -9,6 +9,8 @@ #include <sys/resource.h> #include <sys/socket.h> +#include <set> + #include "base/basictypes.h" #include "base/command_line.h" #include "base/eintr_wrapper.h" @@ -47,7 +49,7 @@ void NaClForkDelegate::Init(const bool sandboxed, DCHECK(kNaClSandboxDescriptor == sandboxdesc); CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0); - base::file_handle_mapping_vector fds_to_map; + base::FileHandleMappingVector fds_to_map; fds_to_map.push_back(std::make_pair(fds[1], kNaClZygoteDescriptor)); fds_to_map.push_back(std::make_pair(sandboxdesc, kNaClSandboxDescriptor)); diff --git a/chrome/app/nacl_fork_delegate_linux.h b/chrome/app/nacl_fork_delegate_linux.h index 853df09..24fe658 100644 --- a/chrome/app/nacl_fork_delegate_linux.h +++ b/chrome/app/nacl_fork_delegate_linux.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -6,6 +6,9 @@ #define CHROME_APP_NACL_FORK_DELEGATE_LINUX_H_ #pragma once +#include <string> +#include <vector> + #include "base/basictypes.h" #include "base/compiler_specific.h" #include "content/public/common/zygote_fork_delegate_linux.h" diff --git a/chrome/browser/chromeos/process_proxy/process_proxy.cc b/chrome/browser/chromeos/process_proxy/process_proxy.cc index a5b3ac9..436eb5b 100644 --- a/chrome/browser/chromeos/process_proxy/process_proxy.cc +++ b/chrome/browser/chromeos/process_proxy/process_proxy.cc @@ -4,7 +4,6 @@ #include "chrome/browser/chromeos/process_proxy/process_proxy.h" -#include <cstdio> #include <fcntl.h> #include <stdlib.h> #include <sys/ioctl.h> @@ -120,8 +119,8 @@ void ProcessProxy::OnProcessOutput(ProcessOutputType type, } bool ProcessProxy::StopWatching() { - if (!watcher_started_) - return true; + if (!watcher_started_) + return true; // Signal Watcher that we are done. We use self-pipe trick to unblock watcher. // Anything may be written to the pipe. const char message[] = "q"; @@ -207,9 +206,9 @@ bool ProcessProxy::CreatePseudoTerminalPair(int *pt_pair) { } bool ProcessProxy::LaunchProcess(const std::string& command, int slave_fd, - pid_t *pid) { + pid_t* pid) { // Redirect crosh process' output and input so we can read it. - base::file_handle_mapping_vector fds_mapping; + base::FileHandleMappingVector fds_mapping; fds_mapping.push_back(std::make_pair(slave_fd, STDIN_FILENO)); fds_mapping.push_back(std::make_pair(slave_fd, STDOUT_FILENO)); fds_mapping.push_back(std::make_pair(slave_fd, STDERR_FILENO)); diff --git a/chrome/browser/chromeos/process_proxy/process_proxy.h b/chrome/browser/chromeos/process_proxy/process_proxy.h index fb50655..d47fa2f 100644 --- a/chrome/browser/chromeos/process_proxy/process_proxy.h +++ b/chrome/browser/chromeos/process_proxy/process_proxy.h @@ -6,10 +6,12 @@ #define CHROME_BROWSER_CHROMEOS_PROCESS_PROXY_PROCESS_PROXY_H_ #pragma once -#include <cstdio> #include <fcntl.h> #include <signal.h> +#include <cstdio> +#include <string> + #include "base/memory/ref_counted.h" #include "chrome/browser/chromeos/process_proxy/process_output_watcher.h" diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc index 9fb5485..c20229b 100644 --- a/chrome/browser/importer/external_process_importer_client.cc +++ b/chrome/browser/importer/external_process_importer_client.cc @@ -81,7 +81,7 @@ void ExternalProcessImporterClient::StartProcessOnIOThread( utility_process_host_->DisableSandbox(); #if defined(OS_MACOSX) - base::environment_vector env; + base::EnvironmentVector env; std::string dylib_path = GetFirefoxDylibPath().value(); if (!dylib_path.empty()) env.push_back(std::make_pair("DYLD_FALLBACK_LIBRARY_PATH", dylib_path)); diff --git a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc index 9f74a23..8facec5 100644 --- a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc +++ b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -39,7 +39,7 @@ bool LaunchNSSDecrypterChildProcess(const FilePath& nss_path, // Set env variable needed for FF encryption libs to load. // See "chrome/browser/importer/nss_decryptor_mac.mm" for an explanation of // why we need this. - base::environment_vector env; + base::EnvironmentVector env; std::pair<std::string, std::string> dyld_override; dyld_override.first = "DYLD_FALLBACK_LIBRARY_PATH"; dyld_override.second = nss_path.value(); @@ -50,7 +50,7 @@ bool LaunchNSSDecrypterChildProcess(const FilePath& nss_path, return false; file_util::ScopedFD client_file_descriptor_closer(&ipcfd); - base::file_handle_mapping_vector fds_to_map; + base::FileHandleMappingVector fds_to_map; fds_to_map.push_back(std::pair<int,int>(ipcfd, kPrimaryIPCChannel + 3)); bool debug_on_start = CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/chrome/browser/mac/relauncher.cc b/chrome/browser/mac/relauncher.cc index 138ab17..aaaacb9 100644 --- a/chrome/browser/mac/relauncher.cc +++ b/chrome/browser/mac/relauncher.cc @@ -151,7 +151,7 @@ bool RelaunchAppWithHelper(const std::string& helper, kRelauncherSyncFD != STDERR_FILENO, kRelauncherSyncFD_must_not_conflict_with_stdio_fds); - base::file_handle_mapping_vector fd_map; + base::FileHandleMappingVector fd_map; fd_map.push_back(std::make_pair(*pipe_write_fd, kRelauncherSyncFD)); base::LaunchOptions options; diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc index 88bd946..baa6904 100644 --- a/chrome/browser/nacl_host/nacl_process_host.cc +++ b/chrome/browser/nacl_host/nacl_process_host.cc @@ -2,13 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "build/build_config.h" - #include "chrome/browser/nacl_host/nacl_process_host.h" -#if defined(OS_POSIX) -#include <fcntl.h> -#endif +#include <string> +#include <vector> #include "base/bind.h" #include "base/command_line.h" @@ -17,6 +14,7 @@ #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "base/win/windows_version.h" +#include "build/build_config.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/logging_chrome.h" @@ -31,13 +29,16 @@ #include "native_client/src/shared/imc/nacl_imc.h" #if defined(OS_POSIX) +#include <fcntl.h> + #include "ipc/ipc_channel_posix.h" #elif defined(OS_WIN) +#include <windows.h> + #include "base/threading/thread.h" #include "base/process_util.h" #include "chrome/browser/nacl_host/nacl_broker_service_win.h" #include "native_client/src/trusted/service_runtime/win/debug_exception_handler.h" -#include <windows.h> #endif using content::BrowserThread; @@ -413,7 +414,7 @@ bool NaClProcessHost::LaunchSelLdr() { } #elif defined(OS_POSIX) process_->Launch(nacl_loader_prefix.empty(), // use_zygote - base::environment_vector(), + base::EnvironmentVector(), cmd_line); #endif diff --git a/chrome/browser/platform_util_linux.cc b/chrome/browser/platform_util_linux.cc index f003769..2bc84cb 100644 --- a/chrome/browser/platform_util_linux.cc +++ b/chrome/browser/platform_util_linux.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -20,7 +20,7 @@ void XDGUtil(const std::string& util, const std::string& arg) { argv.push_back(util); argv.push_back(arg); - base::environment_vector env; + base::EnvironmentVector env; // xdg-open can fall back on mailcap which eventually might plumb through // to a command that needs a terminal. Set the environment variable telling // it that we definitely don't have a terminal available and that it should diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc index b567d76..83dc857 100644 --- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc +++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc @@ -390,7 +390,7 @@ base::ProcessHandle CloudPrintProxyPolicyStartupTest::Launch( this, IOMessageLoopProxy())); #if defined(OS_POSIX) - base::file_handle_mapping_vector ipc_file_list; + base::FileHandleMappingVector ipc_file_list; ipc_file_list.push_back(std::make_pair( startup_channel_->TakeClientFileDescriptor(), kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor)); diff --git a/chrome/browser/process_info_snapshot_mac_unittest.cc b/chrome/browser/process_info_snapshot_mac_unittest.cc index 0ddbda4..ec44a83 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) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -99,7 +99,7 @@ TEST_F(ProcessInfoSnapshotMacTest, EffectiveVsRealUserIDTest) { // Create a pipe to be able to read top's output. int fds[2]; PCHECK(pipe(fds) == 0); - base::file_handle_mapping_vector fds_to_remap; + base::FileHandleMappingVector fds_to_remap; fds_to_remap.push_back(std::make_pair(fds[1], 1)); // Hook up top's stderr to the test process' stderr. diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc index d74cf87..574bd09 100644 --- a/chrome/browser/shell_integration_linux.cc +++ b/chrome/browser/shell_integration_linux.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -55,7 +55,7 @@ bool LaunchXdgUtility(const std::vector<std::string>& argv, int* exit_code) { int devnull = open("/dev/null", O_RDONLY); if (devnull < 0) return false; - base::file_handle_mapping_vector no_stdin; + base::FileHandleMappingVector no_stdin; no_stdin.push_back(std::make_pair(devnull, STDIN_FILENO)); base::ProcessHandle handle; diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc index 434dec24..088636d 100644 --- a/chrome/test/automation/proxy_launcher.cc +++ b/chrome/test/automation/proxy_launcher.cc @@ -4,6 +4,8 @@ #include "chrome/test/automation/proxy_launcher.h" +#include <vector> + #include "base/environment.h" #include "base/file_util.h" #include "base/string_number_conversions.h" @@ -476,7 +478,7 @@ bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state, #elif defined(OS_POSIX) int ipcfd = -1; file_util::ScopedFD ipcfd_closer(&ipcfd); - base::file_handle_mapping_vector fds; + base::FileHandleMappingVector fds; if (main_launch && automation_proxy_.get()) { ipcfd = automation_proxy_->channel()->TakeClientFileDescriptor(); fds.push_back(std::make_pair(ipcfd, kPrimaryIPCChannel + 3)); |