diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 15:52:45 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 15:52:45 +0000 |
commit | a5a00b1dd7a4950de617bb9bb9bc596d1f89965f (patch) | |
tree | bfa6a819deb40647392a5b4db31d26e428eb0e37 /chrome | |
parent | 152c76a49742732b72d061032979d5b27ca2af28 (diff) | |
download | chromium_src-a5a00b1dd7a4950de617bb9bb9bc596d1f89965f.zip chromium_src-a5a00b1dd7a4950de617bb9bb9bc596d1f89965f.tar.gz chromium_src-a5a00b1dd7a4950de617bb9bb9bc596d1f89965f.tar.bz2 |
Move ProcessEntry and IoCounters inside namespace base.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/1599007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/memory_details_mac.cc | 14 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database_bloom.cc | 4 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/test/chrome_process_util.cc | 11 | ||||
-rw-r--r-- | chrome/test/chrome_process_util.h | 9 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.cc | 2 |
6 files changed, 21 insertions, 23 deletions
diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc index fda205e..2b334e4 100644 --- a/chrome/browser/memory_details_mac.cc +++ b/chrome/browser/memory_details_mac.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -104,9 +104,9 @@ void MemoryDetails::CollectProcessData( base::NamedProcessIterator process_it(process_data_[index].process_name, NULL); - while (const ProcessEntry* process_entry = process_it.NextProcessEntry()) { - pids_by_browser[index].push_back(process_entry->pid); - all_pids.push_back(process_entry->pid); + while (const base::ProcessEntry* entry = process_it.NextProcessEntry()) { + pids_by_browser[index].push_back(entry->pid); + all_pids.push_back(entry->pid); } } @@ -115,9 +115,9 @@ void MemoryDetails::CollectProcessData( { base::NamedProcessIterator helper_it(chrome::kHelperProcessExecutableName, NULL); - while (const ProcessEntry* process_entry = helper_it.NextProcessEntry()) { - helper_pids.push_back(process_entry->pid); - all_pids.push_back(process_entry->pid); + while (const base::ProcessEntry* entry = helper_it.NextProcessEntry()) { + helper_pids.push_back(entry->pid); + all_pids.push_back(entry->pid); } } diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc index d1ceb37..6951e41 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -473,7 +473,7 @@ void SafeBrowsingDatabaseBloom::GetChunkIds( void SafeBrowsingDatabaseBloom::BuildBloomFilter() { #if defined(OS_WIN) // For measuring the amount of IO during the bloom filter build. - IoCounters io_before, io_after; + base::IoCounters io_before, io_after; base::ProcessHandle handle = base::Process::Current().handle(); scoped_ptr<base::ProcessMetrics> metric; metric.reset(base::ProcessMetrics::CreateProcessMetrics(handle)); diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index 84cbc80..ea4a7684 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. // @@ -1024,7 +1024,7 @@ struct ChunksInfo { void PerformUpdate(const FilePath& initial_db, const std::vector<ChunksInfo>& chunks, const std::vector<SBChunkDelete>& deletes) { - IoCounters before, after; + base::IoCounters before, after; FilePath path; PathService::Get(base::DIR_TEMP, &path); diff --git a/chrome/test/chrome_process_util.cc b/chrome/test/chrome_process_util.cc index dd3ee1b..5f47df0 100644 --- a/chrome/test/chrome_process_util.cc +++ b/chrome/test/chrome_process_util.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -70,15 +70,12 @@ class ChildProcessFilter : public base::ProcessFilter { ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) { ChromeProcessList result; - if (browser_pid == static_cast<base::ProcessId>(-1)) return result; ChildProcessFilter filter(browser_pid); base::NamedProcessIterator it(chrome::kBrowserProcessExecutableName, &filter); - - const ProcessEntry* process_entry; - while ((process_entry = it.NextProcessEntry())) { + while (const base::ProcessEntry* process_entry = it.NextProcessEntry()) { #if defined(OS_WIN) result.push_back(process_entry->th32ProcessID); #elif defined(OS_POSIX) @@ -94,7 +91,7 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) { ChildProcessFilter filter(result); base::NamedProcessIterator it(chrome::kBrowserProcessExecutableName, &filter); - while ((process_entry = it.NextProcessEntry())) + while (const base::ProcessEntry* process_entry = it.NextProcessEntry()) result.push_back(process_entry->pid); } #endif // defined(OS_LINUX) @@ -107,7 +104,7 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) { ChildProcessFilter filter(browser_pid); base::NamedProcessIterator it(chrome::kHelperProcessExecutableName, &filter); - while ((process_entry = it.NextProcessEntry())) + while (const base::ProcessEntry* process_entry = it.NextProcessEntry()) result.push_back(process_entry->pid); } #endif // defined(OS_MACOSX) diff --git a/chrome/test/chrome_process_util.h b/chrome/test/chrome_process_util.h index 94e0355..31bb897 100644 --- a/chrome/test/chrome_process_util.h +++ b/chrome/test/chrome_process_util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -46,7 +46,7 @@ class ChromeTestProcessMetrics { return process_metrics_->GetPeakWorkingSetSize(); } - bool GetIOCounters(IoCounters* io_counters) { + bool GetIOCounters(base::IoCounters* io_counters) { return process_metrics_->GetIOCounters(io_counters); } @@ -54,10 +54,11 @@ class ChromeTestProcessMetrics { private: explicit ChromeTestProcessMetrics(base::ProcessHandle process) { - process_metrics_.reset( #if !defined(OS_MACOSX) + process_metrics_.reset( base::ProcessMetrics::CreateProcessMetrics(process)); #else + process_metrics_.reset( base::ProcessMetrics::CreateProcessMetrics(process, NULL)); #endif process_handle_ = process; @@ -89,7 +90,7 @@ typedef std::vector<MacChromeProcessInfo> MacChromeProcessInfoList; // Any ProcessId that info can't be found for will be left out. MacChromeProcessInfoList GetRunningMacProcessInfo( - const ChromeProcessList &process_list); + const ChromeProcessList& process_list); #endif // defined(OS_MACOSX) diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 8ebb443..f9c5151 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -1301,7 +1301,7 @@ void UITestBase::PrintIOPerfInfo(const char* test_name) { // base::ProcessMetrics::CreateProcessMetrics(process_handle)); scoped_ptr<ChromeTestProcessMetrics> process_metrics( ChromeTestProcessMetrics::CreateProcessMetrics(process_handle)); - IoCounters io_counters; + base::IoCounters io_counters; memset(&io_counters, 0, sizeof(io_counters)); if (process_metrics.get()->GetIOCounters(&io_counters)) { |