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

Side by Side 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: Move to content/ Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/chrome_browser.gypi » ('j') | content/browser/power_usage_monitor_impl.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #include "components/signin/core/common/profile_management_switches.h" 109 #include "components/signin/core/common/profile_management_switches.h"
110 #include "components/startup_metric_utils/startup_metric_utils.h" 110 #include "components/startup_metric_utils/startup_metric_utils.h"
111 #include "components/translate/content/common/cld_data_source.h" 111 #include "components/translate/content/common/cld_data_source.h"
112 #include "components/translate/core/browser/translate_download_manager.h" 112 #include "components/translate/core/browser/translate_download_manager.h"
113 #include "components/variations/variations_http_header_provider.h" 113 #include "components/variations/variations_http_header_provider.h"
114 #include "content/public/browser/browser_thread.h" 114 #include "content/public/browser/browser_thread.h"
115 #include "content/public/browser/notification_observer.h" 115 #include "content/public/browser/notification_observer.h"
116 #include "content/public/browser/notification_registrar.h" 116 #include "content/public/browser/notification_registrar.h"
117 #include "content/public/browser/notification_service.h" 117 #include "content/public/browser/notification_service.h"
118 #include "content/public/browser/notification_types.h" 118 #include "content/public/browser/notification_types.h"
119 #include "content/public/browser/power_usage_monitor.h"
119 #include "content/public/browser/site_instance.h" 120 #include "content/public/browser/site_instance.h"
120 #include "content/public/common/content_client.h" 121 #include "content/public/common/content_client.h"
121 #include "content/public/common/content_switches.h" 122 #include "content/public/common/content_switches.h"
122 #include "content/public/common/main_function_params.h" 123 #include "content/public/common/main_function_params.h"
123 #include "grit/platform_locale_settings.h" 124 #include "grit/platform_locale_settings.h"
124 #include "net/base/net_module.h" 125 #include "net/base/net_module.h"
125 #include "net/base/sdch_manager.h" 126 #include "net/base/sdch_manager.h"
126 #include "net/cookies/cookie_monster.h" 127 #include "net/cookies/cookie_monster.h"
127 #include "net/http/http_network_layer.h" 128 #include "net/http/http_network_layer.h"
128 #include "net/http/http_stream_factory.h" 129 #include "net/http/http_stream_factory.h"
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 profile_->GetPrefs()); 1552 profile_->GetPrefs());
1552 } 1553 }
1553 1554
1554 run_message_loop_ = true; 1555 run_message_loop_ = true;
1555 } else { 1556 } else {
1556 run_message_loop_ = false; 1557 run_message_loop_ = false;
1557 } 1558 }
1558 browser_creator_.reset(); 1559 browser_creator_.reset();
1559 #endif // !defined(OS_ANDROID) 1560 #endif // !defined(OS_ANDROID)
1560 1561
1562 metrics::MetricsService* metrics = g_browser_process->metrics_service();
1563 if (metrics->reporting_active())
Daniel Erat 2014/09/22 16:10:20 nit: inline the g_browser_process->metrics_service
jeremy 2014/09/29 06:27:14 Done.
1564 content::StartPowerUsageMonitor();
1565
1561 #if !defined(OS_ANDROID) 1566 #if !defined(OS_ANDROID)
1562 process_power_collector_.reset(new ProcessPowerCollector); 1567 process_power_collector_.reset(new ProcessPowerCollector);
1563 process_power_collector_->Initialize(); 1568 process_power_collector_->Initialize();
1564 #endif 1569 #endif
1565 1570
1566 PostBrowserStart(); 1571 PostBrowserStart();
1567 1572
1568 if (parameters().ui_task) { 1573 if (parameters().ui_task) {
1569 parameters().ui_task->Run(); 1574 parameters().ui_task->Run();
1570 delete parameters().ui_task; 1575 delete parameters().ui_task;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 chromeos::CrosSettings::Shutdown(); 1686 chromeos::CrosSettings::Shutdown();
1682 #endif 1687 #endif
1683 #endif 1688 #endif
1684 } 1689 }
1685 1690
1686 // Public members: 1691 // Public members:
1687 1692
1688 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1693 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1689 chrome_extra_parts_.push_back(parts); 1694 chrome_extra_parts_.push_back(parts);
1690 } 1695 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_browser.gypi » ('j') | content/browser/power_usage_monitor_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698