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

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: Remove rate limiting + Move everything to main thread. 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 unified diff | Download patch
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "components/signin/core/common/profile_management_switches.h" 111 #include "components/signin/core/common/profile_management_switches.h"
112 #include "components/startup_metric_utils/startup_metric_utils.h" 112 #include "components/startup_metric_utils/startup_metric_utils.h"
113 #include "components/translate/content/common/cld_data_source.h" 113 #include "components/translate/content/common/cld_data_source.h"
114 #include "components/translate/core/browser/translate_download_manager.h" 114 #include "components/translate/core/browser/translate_download_manager.h"
115 #include "components/variations/net/variations_http_header_provider.h" 115 #include "components/variations/net/variations_http_header_provider.h"
116 #include "content/public/browser/browser_thread.h" 116 #include "content/public/browser/browser_thread.h"
117 #include "content/public/browser/notification_observer.h" 117 #include "content/public/browser/notification_observer.h"
118 #include "content/public/browser/notification_registrar.h" 118 #include "content/public/browser/notification_registrar.h"
119 #include "content/public/browser/notification_service.h" 119 #include "content/public/browser/notification_service.h"
120 #include "content/public/browser/notification_types.h" 120 #include "content/public/browser/notification_types.h"
121 #include "content/public/browser/power_usage_monitor.h"
121 #include "content/public/browser/site_instance.h" 122 #include "content/public/browser/site_instance.h"
122 #include "content/public/common/content_client.h" 123 #include "content/public/common/content_client.h"
123 #include "content/public/common/content_switches.h" 124 #include "content/public/common/content_switches.h"
124 #include "content/public/common/main_function_params.h" 125 #include "content/public/common/main_function_params.h"
125 #include "grit/platform_locale_settings.h" 126 #include "grit/platform_locale_settings.h"
126 #include "net/base/net_module.h" 127 #include "net/base/net_module.h"
127 #include "net/base/sdch_manager.h" 128 #include "net/base/sdch_manager.h"
128 #include "net/cookies/cookie_monster.h" 129 #include "net/cookies/cookie_monster.h"
129 #include "net/http/http_network_layer.h" 130 #include "net/http/http_network_layer.h"
130 #include "net/http/http_stream_factory.h" 131 #include "net/http/http_stream_factory.h"
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 translate::TranslateDownloadManager::RequestLanguageList( 1570 translate::TranslateDownloadManager::RequestLanguageList(
1570 profile_->GetPrefs()); 1571 profile_->GetPrefs());
1571 } 1572 }
1572 1573
1573 run_message_loop_ = true; 1574 run_message_loop_ = true;
1574 } else { 1575 } else {
1575 run_message_loop_ = false; 1576 run_message_loop_ = false;
1576 } 1577 }
1577 browser_creator_.reset(); 1578 browser_creator_.reset();
1578 1579
1580 #if !defined(OS_LINUX) || defined(OS_CHROMEOS) // http://crbug.com/426393
1581 if (g_browser_process->metrics_service()->reporting_active())
1582 content::StartPowerUsageMonitor();
1583 #endif
1584
1579 process_power_collector_.reset(new ProcessPowerCollector); 1585 process_power_collector_.reset(new ProcessPowerCollector);
1580 process_power_collector_->Initialize(); 1586 process_power_collector_->Initialize();
1581 #endif // !defined(OS_ANDROID) 1587 #endif // !defined(OS_ANDROID)
1582 1588
1583 PostBrowserStart(); 1589 PostBrowserStart();
1584 1590
1585 if (parameters().ui_task) { 1591 if (parameters().ui_task) {
1586 parameters().ui_task->Run(); 1592 parameters().ui_task->Run();
1587 delete parameters().ui_task; 1593 delete parameters().ui_task;
1588 run_message_loop_ = false; 1594 run_message_loop_ = false;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 chromeos::CrosSettings::Shutdown(); 1704 chromeos::CrosSettings::Shutdown();
1699 #endif 1705 #endif
1700 #endif 1706 #endif
1701 } 1707 }
1702 1708
1703 // Public members: 1709 // Public members:
1704 1710
1705 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1711 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1706 chrome_extra_parts_.push_back(parts); 1712 chrome_extra_parts_.push_back(parts);
1707 } 1713 }
OLDNEW
« 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