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/test | |
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/test')
-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 |
3 files changed, 10 insertions, 12 deletions
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)) { |