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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 2456783002: Decouple PowerUsageMonitor{Impl} from //content/browser (Closed)
Patch Set: change define position of power_usage_moniter_ in ChromeBrowserMain Created 4 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 #include "components/variations/service/variations_service.h" 146 #include "components/variations/service/variations_service.h"
147 #include "components/variations/variations_associated_data.h" 147 #include "components/variations/variations_associated_data.h"
148 #include "components/variations/variations_http_header_provider.h" 148 #include "components/variations/variations_http_header_provider.h"
149 #include "components/variations/variations_switches.h" 149 #include "components/variations/variations_switches.h"
150 #include "components/version_info/version_info.h" 150 #include "components/version_info/version_info.h"
151 #include "content/public/browser/browser_thread.h" 151 #include "content/public/browser/browser_thread.h"
152 #include "content/public/browser/notification_observer.h" 152 #include "content/public/browser/notification_observer.h"
153 #include "content/public/browser/notification_registrar.h" 153 #include "content/public/browser/notification_registrar.h"
154 #include "content/public/browser/notification_service.h" 154 #include "content/public/browser/notification_service.h"
155 #include "content/public/browser/notification_types.h" 155 #include "content/public/browser/notification_types.h"
156 #include "content/public/browser/power_usage_monitor.h"
157 #include "content/public/browser/site_instance.h" 156 #include "content/public/browser/site_instance.h"
158 #include "content/public/common/content_client.h" 157 #include "content/public/common/content_client.h"
159 #include "content/public/common/content_features.h" 158 #include "content/public/common/content_features.h"
160 #include "content/public/common/content_switches.h" 159 #include "content/public/common/content_switches.h"
161 #include "content/public/common/main_function_params.h" 160 #include "content/public/common/main_function_params.h"
162 #include "device/geolocation/geolocation_delegate.h" 161 #include "device/geolocation/geolocation_delegate.h"
163 #include "device/geolocation/geolocation_provider.h" 162 #include "device/geolocation/geolocation_provider.h"
164 #include "media/base/media_resources.h" 163 #include "media/base/media_resources.h"
165 #include "net/base/net_module.h" 164 #include "net/base/net_module.h"
166 #include "net/cookies/cookie_monster.h" 165 #include "net/cookies/cookie_monster.h"
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 variations_service->PerformPreMainMessageLoopStartup(); 1924 variations_service->PerformPreMainMessageLoopStartup();
1926 1925
1927 translate::TranslateDownloadManager::RequestLanguageList( 1926 translate::TranslateDownloadManager::RequestLanguageList(
1928 profile_->GetPrefs()); 1927 profile_->GetPrefs());
1929 } 1928 }
1930 } 1929 }
1931 run_message_loop_ = started; 1930 run_message_loop_ = started;
1932 browser_creator_.reset(); 1931 browser_creator_.reset();
1933 1932
1934 #if !defined(OS_LINUX) || defined(OS_CHROMEOS) // http://crbug.com/426393 1933 #if !defined(OS_LINUX) || defined(OS_CHROMEOS) // http://crbug.com/426393
1935 content::StartPowerUsageMonitor(); 1934 power_usage_monitor_.reset(new PowerUsageMonitor());
1935 power_usage_monitor_->Start();
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/power_usage_monitor/power_usage_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698