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

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: address stevenjb's nits 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') | chromeos/power/power_data_collector.h » ('J')
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 #include "chromeos/dbus/dbus_thread_manager.h" 86 #include "chromeos/dbus/dbus_thread_manager.h"
87 #include "chromeos/dbus/power_policy_controller.h" 87 #include "chromeos/dbus/power_policy_controller.h"
88 #include "chromeos/dbus/session_manager_client.h" 88 #include "chromeos/dbus/session_manager_client.h"
89 #include "chromeos/disks/disk_mount_manager.h" 89 #include "chromeos/disks/disk_mount_manager.h"
90 #include "chromeos/ime/input_method_manager.h" 90 #include "chromeos/ime/input_method_manager.h"
91 #include "chromeos/ime/xkeyboard.h" 91 #include "chromeos/ime/xkeyboard.h"
92 #include "chromeos/login/login_state.h" 92 #include "chromeos/login/login_state.h"
93 #include "chromeos/network/network_change_notifier_chromeos.h" 93 #include "chromeos/network/network_change_notifier_chromeos.h"
94 #include "chromeos/network/network_change_notifier_factory_chromeos.h" 94 #include "chromeos/network/network_change_notifier_factory_chromeos.h"
95 #include "chromeos/network/network_handler.h" 95 #include "chromeos/network/network_handler.h"
96 #include "chromeos/power/power_data_collector.h"
96 #include "chromeos/system/statistics_provider.h" 97 #include "chromeos/system/statistics_provider.h"
97 #include "content/public/browser/browser_thread.h" 98 #include "content/public/browser/browser_thread.h"
98 #include "content/public/browser/notification_service.h" 99 #include "content/public/browser/notification_service.h"
99 #include "content/public/browser/power_save_blocker.h" 100 #include "content/public/browser/power_save_blocker.h"
100 #include "content/public/common/main_function_params.h" 101 #include "content/public/common/main_function_params.h"
101 #include "grit/platform_locale_settings.h" 102 #include "grit/platform_locale_settings.h"
102 #include "media/audio/sounds/sounds_manager.h" 103 #include "media/audio/sounds/sounds_manager.h"
103 #include "net/base/network_change_notifier.h" 104 #include "net/base/network_change_notifier.h"
104 #include "net/url_request/url_request.h" 105 #include "net/url_request/url_request.h"
105 #include "net/url_request/url_request_context_getter.h" 106 #include "net/url_request/url_request_context_getter.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 PathService::Override(chromeos::DIR_USER_POLICY_KEYS, 257 PathService::Override(chromeos::DIR_USER_POLICY_KEYS,
257 user_data_dir.AppendASCII("stub_user_policy")); 258 user_data_dir.AppendASCII("stub_user_policy"));
258 } 259 }
259 } 260 }
260 261
261 // Initialize DBusThreadManager for the browser. This must be done after 262 // Initialize DBusThreadManager for the browser. This must be done after
262 // the main message loop is started, as it uses the message loop. 263 // the main message loop is started, as it uses the message loop.
263 DBusThreadManager::Initialize(); 264 DBusThreadManager::Initialize();
264 CrosDBusService::Initialize(); 265 CrosDBusService::Initialize();
265 266
267 // Initialize PowerDataCollector after DBusThreadManager is initialized.
268 PowerDataCollector::Initialize();
269
266 LoginState::Initialize(); 270 LoginState::Initialize();
267 SystemSaltGetter::Initialize(); 271 SystemSaltGetter::Initialize();
268 CertLoader::Initialize(); 272 CertLoader::Initialize();
269 273
270 // This function and SystemKeyEventListener use InputMethodManager. 274 // This function and SystemKeyEventListener use InputMethodManager.
271 chromeos::input_method::Initialize( 275 chromeos::input_method::Initialize(
272 content::BrowserThread::GetMessageLoopProxyForThread( 276 content::BrowserThread::GetMessageLoopProxyForThread(
273 content::BrowserThread::UI), 277 content::BrowserThread::UI),
274 content::BrowserThread::GetMessageLoopProxyForThread( 278 content::BrowserThread::GetMessageLoopProxyForThread(
275 content::BrowserThread::FILE)); 279 content::BrowserThread::FILE));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 313
310 cryptohome::AsyncMethodCaller::Shutdown(); 314 cryptohome::AsyncMethodCaller::Shutdown();
311 disks::DiskMountManager::Shutdown(); 315 disks::DiskMountManager::Shutdown();
312 input_method::Shutdown(); 316 input_method::Shutdown();
313 317
314 SystemSaltGetter::Shutdown(); 318 SystemSaltGetter::Shutdown();
315 LoginState::Shutdown(); 319 LoginState::Shutdown();
316 320
317 CrosDBusService::Shutdown(); 321 CrosDBusService::Shutdown();
318 322
323 // Shutdown the PowerDataCollector before shutting down DBusThreadManager.
324 PowerDataCollector::Shutdown();
325
319 // NOTE: This must only be called if Initialize() was called. 326 // NOTE: This must only be called if Initialize() was called.
320 DBusThreadManager::Shutdown(); 327 DBusThreadManager::Shutdown();
321 } 328 }
322 329
323 private: 330 private:
324 331
325 DISALLOW_COPY_AND_ASSIGN(DBusServices); 332 DISALLOW_COPY_AND_ASSIGN(DBusServices);
326 }; 333 };
327 334
328 } // namespace internal 335 } // namespace internal
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 778
772 // Destroy DeviceSettingsService after g_browser_process. 779 // Destroy DeviceSettingsService after g_browser_process.
773 DeviceSettingsService::Shutdown(); 780 DeviceSettingsService::Shutdown();
774 } 781 }
775 782
776 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { 783 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() {
777 default_pinned_apps_field_trial::SetupTrial(); 784 default_pinned_apps_field_trial::SetupTrial();
778 } 785 }
779 786
780 } // namespace chromeos 787 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/chromeos.gyp » ('j') | chromeos/power/power_data_collector.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698