summaryrefslogtreecommitdiffstats
path: root/chrome/test/chrome_process_util.cc
diff options
context:
space:
mode:
authorsgk@chromium.org <sgk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 22:31:12 +0000
committersgk@chromium.org <sgk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 22:31:12 +0000
commitb429982e9e25eafd853036f210c299a0ea56585a (patch)
tree24a3fd58ffc47e7db870d08723ce0244aebe15c0 /chrome/test/chrome_process_util.cc
parent157d547807a2b9d0e42f17636ffc39336a9a62f6 (diff)
downloadchromium_src-b429982e9e25eafd853036f210c299a0ea56585a.zip
chromium_src-b429982e9e25eafd853036f210c299a0ea56585a.tar.gz
chromium_src-b429982e9e25eafd853036f210c299a0ea56585a.tar.bz2
Get rid of GetMemoryInfo() in favor of using base::ProcessMetrics.
Use a test-specific subclass to isolate the stopgap use of 'ps' to collect memory stats on Mac. BUG=none TEST=none Review URL: http://codereview.chromium.org/342070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chrome_process_util.cc')
-rw-r--r--chrome/test/chrome_process_util.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/chrome_process_util.cc b/chrome/test/chrome_process_util.cc
index 4454596..f53cbbd 100644
--- a/chrome/test/chrome_process_util.cc
+++ b/chrome/test/chrome_process_util.cc
@@ -116,3 +116,15 @@ ChromeProcessList GetRunningChromeProcesses(const FilePath& data_dir) {
return result;
}
+
+#if !defined(OS_MACOSX)
+
+size_t ChromeTestProcessMetrics::GetPagefileUsage() {
+ return process_metrics_->GetPagefileUsage();
+}
+
+size_t ChromeTestProcessMetrics::GetWorkingSetSize() {
+ return process_metrics_->GetWorkingSetSize();
+}
+
+#endif // !defined(OS_MACOSX)