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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 560553005: Battery impact UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now with unit tests Created 6 years, 2 months 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/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index b509e20670fb4fb623f76565cb0a90dbb08056be..2b49029eaee5de315a9de11f99783cffa6a17370 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -116,6 +116,7 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/power_usage_monitor.h"
#include "content/public/browser/site_instance.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
@@ -1553,6 +1554,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_creator_.reset();
#endif // !defined(OS_ANDROID)
+ if (g_browser_process->metrics_service()->reporting_active())
+ content::StartPowerUsageMonitor();
Daniel Erat 2014/10/21 16:01:20 is this the proper way to check whether metrics ar
jeremy 2014/10/23 14:32:45 Avi: Do you know whether we need to null check met
+
#if !defined(OS_ANDROID)
process_power_collector_.reset(new ProcessPowerCollector);
process_power_collector_->Initialize();
« no previous file with comments | « no previous file | content/browser/power_usage_monitor_impl.h » ('j') | content/browser/power_usage_monitor_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698