Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 69 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
| 70 #include "chrome/browser/memory/tab_manager.h" | 70 #include "chrome/browser/memory/tab_manager.h" |
| 71 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 71 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
| 72 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 72 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
| 73 #include "chrome/browser/metrics/thread_watcher.h" | 73 #include "chrome/browser/metrics/thread_watcher.h" |
| 74 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 74 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
| 75 #include "chrome/browser/net/crl_set_fetcher.h" | 75 #include "chrome/browser/net/crl_set_fetcher.h" |
| 76 #include "chrome/browser/performance_monitor/performance_monitor.h" | 76 #include "chrome/browser/performance_monitor/performance_monitor.h" |
| 77 #include "chrome/browser/plugins/plugin_prefs.h" | 77 #include "chrome/browser/plugins/plugin_prefs.h" |
| 78 #include "chrome/browser/power/process_power_collector.h" | 78 #include "chrome/browser/power/process_power_collector.h" |
| 79 #include "chrome/browser/power_usage_monitor/power_usage_monitor_impl.h" | |
| 79 #include "chrome/browser/prefs/chrome_command_line_pref_store.h" | 80 #include "chrome/browser/prefs/chrome_command_line_pref_store.h" |
| 80 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 81 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
| 81 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 82 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 82 #include "chrome/browser/prefs/pref_metrics_service.h" | 83 #include "chrome/browser/prefs/pref_metrics_service.h" |
| 83 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 84 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| 84 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" | 85 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" |
| 85 #include "chrome/browser/process_singleton.h" | 86 #include "chrome/browser/process_singleton.h" |
| 86 #include "chrome/browser/profiles/profile.h" | 87 #include "chrome/browser/profiles/profile.h" |
| 87 #include "chrome/browser/profiles/profile_attributes_entry.h" | 88 #include "chrome/browser/profiles/profile_attributes_entry.h" |
| 88 #include "chrome/browser/profiles/profile_attributes_storage.h" | 89 #include "chrome/browser/profiles/profile_attributes_storage.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 #include "components/variations/service/variations_service.h" | 147 #include "components/variations/service/variations_service.h" |
| 147 #include "components/variations/variations_associated_data.h" | 148 #include "components/variations/variations_associated_data.h" |
| 148 #include "components/variations/variations_http_header_provider.h" | 149 #include "components/variations/variations_http_header_provider.h" |
| 149 #include "components/variations/variations_switches.h" | 150 #include "components/variations/variations_switches.h" |
| 150 #include "components/version_info/version_info.h" | 151 #include "components/version_info/version_info.h" |
| 151 #include "content/public/browser/browser_thread.h" | 152 #include "content/public/browser/browser_thread.h" |
| 152 #include "content/public/browser/notification_observer.h" | 153 #include "content/public/browser/notification_observer.h" |
| 153 #include "content/public/browser/notification_registrar.h" | 154 #include "content/public/browser/notification_registrar.h" |
| 154 #include "content/public/browser/notification_service.h" | 155 #include "content/public/browser/notification_service.h" |
| 155 #include "content/public/browser/notification_types.h" | 156 #include "content/public/browser/notification_types.h" |
| 156 #include "content/public/browser/power_usage_monitor.h" | |
| 157 #include "content/public/browser/site_instance.h" | 157 #include "content/public/browser/site_instance.h" |
| 158 #include "content/public/common/content_client.h" | 158 #include "content/public/common/content_client.h" |
| 159 #include "content/public/common/content_features.h" | 159 #include "content/public/common/content_features.h" |
| 160 #include "content/public/common/content_switches.h" | 160 #include "content/public/common/content_switches.h" |
| 161 #include "content/public/common/main_function_params.h" | 161 #include "content/public/common/main_function_params.h" |
| 162 #include "device/geolocation/geolocation_delegate.h" | 162 #include "device/geolocation/geolocation_delegate.h" |
| 163 #include "device/geolocation/geolocation_provider.h" | 163 #include "device/geolocation/geolocation_provider.h" |
| 164 #include "media/base/media_resources.h" | 164 #include "media/base/media_resources.h" |
| 165 #include "net/base/net_module.h" | 165 #include "net/base/net_module.h" |
| 166 #include "net/cookies/cookie_monster.h" | 166 #include "net/cookies/cookie_monster.h" |
| (...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1925 variations_service->PerformPreMainMessageLoopStartup(); | 1925 variations_service->PerformPreMainMessageLoopStartup(); |
| 1926 | 1926 |
| 1927 translate::TranslateDownloadManager::RequestLanguageList( | 1927 translate::TranslateDownloadManager::RequestLanguageList( |
| 1928 profile_->GetPrefs()); | 1928 profile_->GetPrefs()); |
| 1929 } | 1929 } |
| 1930 } | 1930 } |
| 1931 run_message_loop_ = started; | 1931 run_message_loop_ = started; |
| 1932 browser_creator_.reset(); | 1932 browser_creator_.reset(); |
| 1933 | 1933 |
| 1934 #if !defined(OS_LINUX) || defined(OS_CHROMEOS) // http://crbug.com/426393 | 1934 #if !defined(OS_LINUX) || defined(OS_CHROMEOS) // http://crbug.com/426393 |
| 1935 content::StartPowerUsageMonitor(); | 1935 PowerUsageMonitor::StartPowerUsageMonitor(); |
|
blundell
2016/10/27 21:21:55
I think this could just be owned directly by Chrom
ke.he
2016/10/28 09:39:20
Done.
The original implementation of this StartPow
| |
| 1936 #endif // !defined(OS_LINUX) || defined(OS_CHROMEOS) | 1936 #endif // !defined(OS_LINUX) || defined(OS_CHROMEOS) |
| 1937 | 1937 |
| 1938 process_power_collector_.reset(new ProcessPowerCollector); | 1938 process_power_collector_.reset(new ProcessPowerCollector); |
| 1939 process_power_collector_->Initialize(); | 1939 process_power_collector_->Initialize(); |
| 1940 #endif // !defined(OS_ANDROID) | 1940 #endif // !defined(OS_ANDROID) |
| 1941 | 1941 |
| 1942 PostBrowserStart(); | 1942 PostBrowserStart(); |
| 1943 | 1943 |
| 1944 if (parameters().ui_task) { | 1944 if (parameters().ui_task) { |
| 1945 parameters().ui_task->Run(); | 1945 parameters().ui_task->Run(); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2111 chromeos::CrosSettings::Shutdown(); | 2111 chromeos::CrosSettings::Shutdown(); |
| 2112 #endif // defined(OS_CHROMEOS) | 2112 #endif // defined(OS_CHROMEOS) |
| 2113 #endif // defined(OS_ANDROID) | 2113 #endif // defined(OS_ANDROID) |
| 2114 } | 2114 } |
| 2115 | 2115 |
| 2116 // Public members: | 2116 // Public members: |
| 2117 | 2117 |
| 2118 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2118 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2119 chrome_extra_parts_.push_back(parts); | 2119 chrome_extra_parts_.push_back(parts); |
| 2120 } | 2120 } |
| OLD | NEW |