Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database_unittest.cc

Issue 500118: Fix cpu/memory measurements on OS X. (Closed)
Patch Set: foobar Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 3d244c035bdee927a41f3050e25929d81475aece..30f9de4749470e506a86596029e4519a2f4b5466 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -1078,7 +1078,12 @@ void PeformUpdate(const std::wstring& initial_db,
Time before_time = Time::Now();
base::ProcessHandle handle = base::Process::Current().handle();
scoped_ptr<base::ProcessMetrics> metric(
+#if !defined(OS_MACOSX)
base::ProcessMetrics::CreateProcessMetrics(handle));
+#else
+ // Getting stats only for the current process is enough, so NULL is fine.
+ base::ProcessMetrics::CreateProcessMetrics(handle, NULL));
+#endif
CHECK(metric->GetIOCounters(&before));
std::vector<SBListChunkRanges> lists;

Powered by Google App Engine
This is Rietveld 408576698