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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 101963004: [chromeos] New PowerManagerClient observer to collect power data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chromeos/chromeos.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 #include "chromeos/dbus/dbus_thread_manager.h" 85 #include "chromeos/dbus/dbus_thread_manager.h"
86 #include "chromeos/dbus/power_policy_controller.h" 86 #include "chromeos/dbus/power_policy_controller.h"
87 #include "chromeos/dbus/session_manager_client.h" 87 #include "chromeos/dbus/session_manager_client.h"
88 #include "chromeos/disks/disk_mount_manager.h" 88 #include "chromeos/disks/disk_mount_manager.h"
89 #include "chromeos/ime/input_method_manager.h" 89 #include "chromeos/ime/input_method_manager.h"
90 #include "chromeos/ime/xkeyboard.h" 90 #include "chromeos/ime/xkeyboard.h"
91 #include "chromeos/login/login_state.h" 91 #include "chromeos/login/login_state.h"
92 #include "chromeos/network/network_change_notifier_chromeos.h" 92 #include "chromeos/network/network_change_notifier_chromeos.h"
93 #include "chromeos/network/network_change_notifier_factory_chromeos.h" 93 #include "chromeos/network/network_change_notifier_factory_chromeos.h"
94 #include "chromeos/network/network_handler.h" 94 #include "chromeos/network/network_handler.h"
95 #include "chromeos/power/power_data_collector.h"
95 #include "chromeos/system/statistics_provider.h" 96 #include "chromeos/system/statistics_provider.h"
96 #include "content/public/browser/browser_thread.h" 97 #include "content/public/browser/browser_thread.h"
97 #include "content/public/browser/notification_service.h" 98 #include "content/public/browser/notification_service.h"
98 #include "content/public/browser/power_save_blocker.h" 99 #include "content/public/browser/power_save_blocker.h"
99 #include "content/public/common/main_function_params.h" 100 #include "content/public/common/main_function_params.h"
100 #include "grit/platform_locale_settings.h" 101 #include "grit/platform_locale_settings.h"
101 #include "media/audio/sounds/sounds_manager.h" 102 #include "media/audio/sounds/sounds_manager.h"
102 #include "net/base/network_change_notifier.h" 103 #include "net/base/network_change_notifier.h"
103 #include "net/url_request/url_request.h" 104 #include "net/url_request/url_request.h"
104 #include "net/url_request/url_request_context_getter.h" 105 #include "net/url_request/url_request_context_getter.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 PathService::Override(chromeos::DIR_USER_POLICY_KEYS, 254 PathService::Override(chromeos::DIR_USER_POLICY_KEYS,
254 user_data_dir.AppendASCII("stub_user_policy")); 255 user_data_dir.AppendASCII("stub_user_policy"));
255 } 256 }
256 } 257 }
257 258
258 // Initialize DBusThreadManager for the browser. This must be done after 259 // Initialize DBusThreadManager for the browser. This must be done after
259 // the main message loop is started, as it uses the message loop. 260 // the main message loop is started, as it uses the message loop.
260 DBusThreadManager::Initialize(); 261 DBusThreadManager::Initialize();
261 CrosDBusService::Initialize(); 262 CrosDBusService::Initialize();
262 263
264 // Initialize PowerDataCollector after DBusThreadManager is initialized.
265 PowerDataCollector::Initialize();
266
263 LoginState::Initialize(); 267 LoginState::Initialize();
264 SystemSaltGetter::Initialize(); 268 SystemSaltGetter::Initialize();
265 CertLoader::Initialize(); 269 CertLoader::Initialize();
266 270
267 // This function and SystemKeyEventListener use InputMethodManager. 271 // This function and SystemKeyEventListener use InputMethodManager.
268 chromeos::input_method::Initialize( 272 chromeos::input_method::Initialize(
269 content::BrowserThread::GetMessageLoopProxyForThread( 273 content::BrowserThread::GetMessageLoopProxyForThread(
270 content::BrowserThread::UI), 274 content::BrowserThread::UI),
271 content::BrowserThread::GetMessageLoopProxyForThread( 275 content::BrowserThread::GetMessageLoopProxyForThread(
272 content::BrowserThread::FILE)); 276 content::BrowserThread::FILE));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 310
307 cryptohome::AsyncMethodCaller::Shutdown(); 311 cryptohome::AsyncMethodCaller::Shutdown();
308 disks::DiskMountManager::Shutdown(); 312 disks::DiskMountManager::Shutdown();
309 input_method::Shutdown(); 313 input_method::Shutdown();
310 314
311 SystemSaltGetter::Shutdown(); 315 SystemSaltGetter::Shutdown();
312 LoginState::Shutdown(); 316 LoginState::Shutdown();
313 317
314 CrosDBusService::Shutdown(); 318 CrosDBusService::Shutdown();
315 319
320 // Shutdown the PowerDataCollector before shutting down DBusThreadManager.
321 PowerDataCollector::Shutdown();
322
316 // NOTE: This must only be called if Initialize() was called. 323 // NOTE: This must only be called if Initialize() was called.
317 DBusThreadManager::Shutdown(); 324 DBusThreadManager::Shutdown();
318 } 325 }
319 326
320 private: 327 private:
321 328
322 DISALLOW_COPY_AND_ASSIGN(DBusServices); 329 DISALLOW_COPY_AND_ASSIGN(DBusServices);
323 }; 330 };
324 331
325 } // namespace internal 332 } // namespace internal
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 // Destroy DBus services immediately after threads are stopped. 771 // Destroy DBus services immediately after threads are stopped.
765 dbus_services_.reset(); 772 dbus_services_.reset();
766 773
767 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 774 ChromeBrowserMainPartsLinux::PostDestroyThreads();
768 775
769 // Destroy DeviceSettingsService after g_browser_process. 776 // Destroy DeviceSettingsService after g_browser_process.
770 DeviceSettingsService::Shutdown(); 777 DeviceSettingsService::Shutdown();
771 } 778 }
772 779
773 } // namespace chromeos 780 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/chromeos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698