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

Unified Diff: base/trace_event/process_memory_totals_dump_provider.cc

Issue 1433603004: Add ProcessMetrics::CreateCurrentProcessMetrics() method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a_counter_with_ts
Patch Set: Remove patch dependency Created 5 years, 1 month 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
« no previous file with comments | « base/process/process_metrics.cc ('k') | chrome/browser/safe_browsing/safe_browsing_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/process_memory_totals_dump_provider.cc
diff --git a/base/trace_event/process_memory_totals_dump_provider.cc b/base/trace_event/process_memory_totals_dump_provider.cc
index a8617207dcfc35350496ebf7b27c8d758c891679..f447a1e745c5450586a102cbca35016690f8ea11 100644
--- a/base/trace_event/process_memory_totals_dump_provider.cc
+++ b/base/trace_event/process_memory_totals_dump_provider.cc
@@ -25,17 +25,6 @@ namespace trace_event {
// static
uint64 ProcessMemoryTotalsDumpProvider::rss_bytes_for_testing = 0;
-namespace {
-
-ProcessMetrics* CreateProcessMetricsForCurrentProcess() {
-#if !defined(OS_MACOSX) || defined(OS_IOS)
- return ProcessMetrics::CreateProcessMetrics(GetCurrentProcessHandle());
-#else
- return ProcessMetrics::CreateProcessMetrics(GetCurrentProcessHandle(), NULL);
-#endif
-}
-} // namespace
-
// static
ProcessMemoryTotalsDumpProvider*
ProcessMemoryTotalsDumpProvider::GetInstance() {
@@ -45,8 +34,7 @@ ProcessMemoryTotalsDumpProvider::GetInstance() {
}
ProcessMemoryTotalsDumpProvider::ProcessMemoryTotalsDumpProvider()
- : process_metrics_(CreateProcessMetricsForCurrentProcess()) {
-}
+ : process_metrics_(ProcessMetrics::CreateCurrentProcessMetrics()) {}
ProcessMemoryTotalsDumpProvider::~ProcessMemoryTotalsDumpProvider() {
}
« no previous file with comments | « base/process/process_metrics.cc ('k') | chrome/browser/safe_browsing/safe_browsing_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698