Index: base/process/process_metrics.cc |
diff --git a/base/process/process_metrics.cc b/base/process/process_metrics.cc |
index e48633910763892ea1f64e54a7e0dea9acb1aca1..6d99383cdf69d17c298c21f9dc79f51585c2cd29 100644 |
--- a/base/process/process_metrics.cc |
+++ b/base/process/process_metrics.cc |
@@ -43,6 +43,14 @@ scoped_ptr<Value> SystemMetrics::ToValue() const { |
return res.Pass(); |
} |
+ProcessMetrics* ProcessMetrics::CreateCurrentProcessMetrics() { |
+#if !defined(OS_MACOSX) || defined(OS_IOS) |
+ return CreateProcessMetrics(base::GetCurrentProcessHandle()); |
+#else |
+ return CreateProcessMetrics(base::GetCurrentProcessHandle(), nullptr); |
+#endif // !defined(OS_MACOSX) || defined(OS_IOS) |
+} |
+ |
double ProcessMetrics::GetPlatformIndependentCPUUsage() { |
#if defined(OS_WIN) |
return GetCPUUsage() * processor_count_; |