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

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: Fix review comments Created 6 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 | « no previous file | content/browser/power_usage_monitor_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 3f65f354c154e4b87a7a033b43048d576a404096..61f32ff580fc780f28336fc8c690233362a84331 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -119,6 +119,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"
@@ -1594,6 +1595,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
browser_creator_.reset();
+#if !defined(OS_LINUX) || defined(OS_CHROMEOS) // http://crbug.com/426393
+ if (g_browser_process->metrics_service()->reporting_active())
+ content::StartPowerUsageMonitor();
+#endif
+
process_power_collector_.reset(new ProcessPowerCollector);
process_power_collector_->Initialize();
#endif // !defined(OS_ANDROID)
« no previous file with comments | « no previous file | content/browser/power_usage_monitor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698