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

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

Issue 14522013: Separate cert loading code from CertLibrary and move to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser tests Created 7 years, 7 months 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
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 15 matching lines...) Expand all
26 #include "chrome/browser/browser_process.h" 26 #include "chrome/browser/browser_process.h"
27 #include "chrome/browser/browser_process_platform_part_chromeos.h" 27 #include "chrome/browser/browser_process_platform_part_chromeos.h"
28 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 28 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
29 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 29 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
30 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 30 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
31 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" 31 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h"
32 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 32 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
33 #include "chrome/browser/chromeos/audio/audio_handler.h" 33 #include "chrome/browser/chromeos/audio/audio_handler.h"
34 #include "chrome/browser/chromeos/boot_times_loader.h" 34 #include "chrome/browser/chromeos/boot_times_loader.h"
35 #include "chrome/browser/chromeos/contacts/contact_manager.h" 35 #include "chrome/browser/chromeos/contacts/contact_manager.h"
36 #include "chrome/browser/chromeos/cros/cert_library.h"
36 #include "chrome/browser/chromeos/cros/cros_library.h" 37 #include "chrome/browser/chromeos/cros/cros_library.h"
37 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" 38 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h"
38 #include "chrome/browser/chromeos/display/display_configuration_observer.h" 39 #include "chrome/browser/chromeos/display/display_configuration_observer.h"
39 #include "chrome/browser/chromeos/extensions/default_app_order.h" 40 #include "chrome/browser/chromeos/extensions/default_app_order.h"
40 #include "chrome/browser/chromeos/external_metrics.h" 41 #include "chrome/browser/chromeos/external_metrics.h"
41 #include "chrome/browser/chromeos/imageburner/burn_manager.h" 42 #include "chrome/browser/chromeos/imageburner/burn_manager.h"
42 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" 43 #include "chrome/browser/chromeos/input_method/input_method_configuration.h"
43 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" 44 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h"
44 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" 45 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h"
45 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 46 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 #include "chromeos/chromeos_switches.h" 97 #include "chromeos/chromeos_switches.h"
97 #include "chromeos/cryptohome/async_method_caller.h" 98 #include "chromeos/cryptohome/async_method_caller.h"
98 #include "chromeos/cryptohome/cryptohome_library.h" 99 #include "chromeos/cryptohome/cryptohome_library.h"
99 #include "chromeos/dbus/dbus_thread_manager.h" 100 #include "chromeos/dbus/dbus_thread_manager.h"
100 #include "chromeos/dbus/power_manager_client.h" 101 #include "chromeos/dbus/power_manager_client.h"
101 #include "chromeos/dbus/session_manager_client.h" 102 #include "chromeos/dbus/session_manager_client.h"
102 #include "chromeos/disks/disk_mount_manager.h" 103 #include "chromeos/disks/disk_mount_manager.h"
103 #include "chromeos/ime/input_method_manager.h" 104 #include "chromeos/ime/input_method_manager.h"
104 #include "chromeos/ime/xkeyboard.h" 105 #include "chromeos/ime/xkeyboard.h"
105 #include "chromeos/login/login_state.h" 106 #include "chromeos/login/login_state.h"
107 #include "chromeos/network/cert_loader.h"
106 #include "chromeos/network/geolocation_handler.h" 108 #include "chromeos/network/geolocation_handler.h"
107 #include "chromeos/network/managed_network_configuration_handler.h" 109 #include "chromeos/network/managed_network_configuration_handler.h"
108 #include "chromeos/network/network_change_notifier_chromeos.h" 110 #include "chromeos/network/network_change_notifier_chromeos.h"
109 #include "chromeos/network/network_change_notifier_factory_chromeos.h" 111 #include "chromeos/network/network_change_notifier_factory_chromeos.h"
110 #include "chromeos/network/network_configuration_handler.h" 112 #include "chromeos/network/network_configuration_handler.h"
111 #include "chromeos/network/network_event_log.h" 113 #include "chromeos/network/network_event_log.h"
112 #include "chromeos/network/network_state_handler.h" 114 #include "chromeos/network/network_state_handler.h"
113 #include "content/public/browser/browser_thread.h" 115 #include "content/public/browser/browser_thread.h"
114 #include "content/public/browser/notification_service.h" 116 #include "content/public/browser/notification_service.h"
115 #include "content/public/browser/power_save_blocker.h" 117 #include "content/public/browser/power_save_blocker.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 263 }
262 } 264 }
263 265
264 void RunAutoLaunchKioskApp() { 266 void RunAutoLaunchKioskApp() {
265 // KioskAppLauncher deletes itself when done. 267 // KioskAppLauncher deletes itself when done.
266 (new KioskAppLauncher( 268 (new KioskAppLauncher(
267 KioskAppManager::Get()->GetAutoLaunchApp()))->Start(); 269 KioskAppManager::Get()->GetAutoLaunchApp()))->Start();
268 270
269 // Login screen is skipped but 'login-prompt-visible' signal is still needed. 271 // Login screen is skipped but 'login-prompt-visible' signal is still needed.
270 LOG(INFO) << "Kiosk app auto launch >> login-prompt-visible"; 272 LOG(INFO) << "Kiosk app auto launch >> login-prompt-visible";
271 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> 273 DBusThreadManager::Get()->GetSessionManagerClient()->
272 EmitLoginPromptVisible(); 274 EmitLoginPromptVisible();
273 } 275 }
274 276
275 } // namespace 277 } // namespace
276 278
277 namespace internal { 279 namespace internal {
278 280
279 // Wrapper class for initializing dbus related services and shutting them 281 // Wrapper class for initializing dbus related services and shutting them
280 // down. This gets instantiated in a scoped_ptr so that shutdown methods in the 282 // down. This gets instantiated in a scoped_ptr so that shutdown methods in the
281 // destructor will get called if and only if this has been instantiated. 283 // destructor will get called if and only if this has been instantiated.
282 class DBusServices { 284 class DBusServices {
283 public: 285 public:
284 explicit DBusServices(const content::MainFunctionParams& parameters) 286 explicit DBusServices(const content::MainFunctionParams& parameters)
285 : cros_initialized_(false) { 287 : cros_initialized_(false) {
286 // Initialize CrosLibrary only for the browser, unless running tests 288 // Initialize CrosLibrary only for the browser, unless running tests
287 // (which do their own CrosLibrary setup). 289 // (which do their own CrosLibrary setup).
288 if (!parameters.ui_task) { 290 if (!parameters.ui_task) {
289 const bool use_stub = !base::chromeos::IsRunningOnChromeOS(); 291 const bool use_stub = !base::chromeos::IsRunningOnChromeOS();
290 CrosLibrary::Initialize(use_stub); 292 CrosLibrary::Initialize(use_stub);
291 cros_initialized_ = true; 293 cros_initialized_ = true;
292 } 294 }
293 295
294 // Initialize DBusThreadManager for the browser. This must be done after 296 // Initialize DBusThreadManager for the browser. This must be done after
295 // the main message loop is started, as it uses the message loop. 297 // the main message loop is started, as it uses the message loop.
296 DBusThreadManager::Initialize(); 298 DBusThreadManager::Initialize();
297 CrosDBusService::Initialize(); 299 CrosDBusService::Initialize();
298 300
301 LoginState::Initialize();
302 CertLoader::Initialize();
303 CertLibrary::Initialize();
299 CryptohomeLibrary::Initialize(); 304 CryptohomeLibrary::Initialize();
300 305
301 // This function and SystemKeyEventListener use InputMethodManager. 306 // This function and SystemKeyEventListener use InputMethodManager.
302 chromeos::input_method::Initialize( 307 chromeos::input_method::Initialize(
303 content::BrowserThread::GetMessageLoopProxyForThread( 308 content::BrowserThread::GetMessageLoopProxyForThread(
304 content::BrowserThread::UI), 309 content::BrowserThread::UI),
305 content::BrowserThread::GetMessageLoopProxyForThread( 310 content::BrowserThread::GetMessageLoopProxyForThread(
306 content::BrowserThread::FILE)); 311 content::BrowserThread::FILE));
307 disks::DiskMountManager::Initialize(); 312 disks::DiskMountManager::Initialize();
308 cryptohome::AsyncMethodCaller::Initialize(); 313 cryptohome::AsyncMethodCaller::Initialize();
309 314
310 chromeos::LoginState::Initialize();
311
312 // Always initialize these handlers which should not conflict with 315 // Always initialize these handlers which should not conflict with
313 // NetworkLibrary. 316 // NetworkLibrary.
314 chromeos::network_event_log::Initialize(); 317 network_event_log::Initialize();
315 chromeos::GeolocationHandler::Initialize(); 318 GeolocationHandler::Initialize();
316 chromeos::NetworkStateHandler::Initialize(); 319 NetworkStateHandler::Initialize();
317 320
318 chromeos::NetworkConfigurationHandler::Initialize(); 321 NetworkConfigurationHandler::Initialize();
319 chromeos::ManagedNetworkConfigurationHandler::Initialize(); 322 ManagedNetworkConfigurationHandler::Initialize();
320 323
321 // Initialize the network change notifier for Chrome OS. The network 324 // Initialize the network change notifier for Chrome OS. The network
322 // change notifier starts to monitor changes from the power manager and 325 // change notifier starts to monitor changes from the power manager and
323 // the network manager. 326 // the network manager.
324 if (!CommandLine::ForCurrentProcess()->HasSwitch( 327 if (!CommandLine::ForCurrentProcess()->HasSwitch(
325 chromeos::switches::kDisableNewNetworkChangeNotifier)) { 328 chromeos::switches::kDisableNewNetworkChangeNotifier)) {
326 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); 329 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize();
327 } else { 330 } else {
328 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); 331 CrosNetworkChangeNotifierFactory::GetInstance()->Init();
329 } 332 }
330 333
331 // Likewise, initialize the upgrade detector for Chrome OS. The upgrade 334 // Likewise, initialize the upgrade detector for Chrome OS. The upgrade
332 // detector starts to monitor changes from the update engine. 335 // detector starts to monitor changes from the update engine.
333 UpgradeDetectorChromeos::GetInstance()->Init(); 336 UpgradeDetectorChromeos::GetInstance()->Init();
334 337
335 if (base::chromeos::IsRunningOnChromeOS()) { 338 if (base::chromeos::IsRunningOnChromeOS()) {
336 // Disable Num Lock on X start up for http://crosbug.com/29169. 339 // Disable Num Lock on X start up for http://crosbug.com/29169.
337 input_method::GetInputMethodManager()->GetXKeyboard()-> 340 input_method::GetInputMethodManager()->GetXKeyboard()->
338 SetNumLockEnabled(false); 341 SetNumLockEnabled(false);
339 } 342 }
340 343
341 // Initialize the device settings service so that we'll take actions per 344 // Initialize the device settings service so that we'll take actions per
342 // signals sent from the session manager. This needs to happen before 345 // signals sent from the session manager. This needs to happen before
343 // g_browser_process initializes BrowserPolicyConnector. 346 // g_browser_process initializes BrowserPolicyConnector.
344 DeviceSettingsService::Initialize(); 347 DeviceSettingsService::Initialize();
345 DeviceSettingsService::Get()->SetSessionManager( 348 DeviceSettingsService::Get()->SetSessionManager(
346 DBusThreadManager::Get()->GetSessionManagerClient(), 349 DBusThreadManager::Get()->GetSessionManagerClient(),
347 OwnerKeyUtil::Create()); 350 OwnerKeyUtil::Create());
348 chromeos::ConnectivityStateHelper::Initialize(); 351 ConnectivityStateHelper::Initialize();
349 } 352 }
350 353
351 ~DBusServices() { 354 ~DBusServices() {
352 chromeos::ConnectivityStateHelper::Shutdown(); 355 ConnectivityStateHelper::Shutdown();
353 // CrosLibrary is shut down before DBusThreadManager even though it 356 // CrosLibrary is shut down before DBusThreadManager even though it
354 // is initialized first becuase some of its libraries depend on DBus 357 // is initialized first becuase some of its libraries depend on DBus
355 // clients. 358 // clients.
356 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. 359 // TODO(hashimoto): Resolve this situation by removing CrosLibrary.
357 // (crosbug.com/26160) 360 // (crosbug.com/26160)
358 if (cros_initialized_ && CrosLibrary::Get()) 361 if (cros_initialized_ && CrosLibrary::Get())
359 CrosLibrary::Shutdown(); 362 CrosLibrary::Shutdown();
360 363
361 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); 364 ManagedNetworkConfigurationHandler::Shutdown();
362 chromeos::NetworkConfigurationHandler::Shutdown(); 365 NetworkConfigurationHandler::Shutdown();
363 366
364 chromeos::NetworkStateHandler::Shutdown(); 367 NetworkStateHandler::Shutdown();
365 chromeos::GeolocationHandler::Shutdown(); 368 GeolocationHandler::Shutdown();
366 chromeos::network_event_log::Shutdown(); 369 network_event_log::Shutdown();
367 370
368 chromeos::LoginState::Shutdown(); 371 LoginState::Shutdown();
369 372
370 cryptohome::AsyncMethodCaller::Shutdown(); 373 cryptohome::AsyncMethodCaller::Shutdown();
371 disks::DiskMountManager::Shutdown(); 374 disks::DiskMountManager::Shutdown();
372 input_method::Shutdown(); 375 input_method::Shutdown();
373 CryptohomeLibrary::Shutdown(); 376 CryptohomeLibrary::Shutdown();
377 CertLibrary::Shutdown();
374 CrosDBusService::Shutdown(); 378 CrosDBusService::Shutdown();
375 // NOTE: This must only be called if Initialize() was called. 379 // NOTE: This must only be called if Initialize() was called.
376 DBusThreadManager::Shutdown(); 380 DBusThreadManager::Shutdown();
377 } 381 }
378 382
379 private: 383 private:
380 bool cros_initialized_; 384 bool cros_initialized_;
381 385
382 DISALLOW_COPY_AND_ASSIGN(DBusServices); 386 DISALLOW_COPY_AND_ASSIGN(DBusServices);
383 }; 387 };
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 495
492 // Listen for system key events so that the user will be able to adjust the 496 // Listen for system key events so that the user will be able to adjust the
493 // volume on the login screen, if Chrome is running on Chrome OS 497 // volume on the login screen, if Chrome is running on Chrome OS
494 // (i.e. not Linux desktop), and in non-test mode. 498 // (i.e. not Linux desktop), and in non-test mode.
495 // Note: SystemKeyEventListener depends on the DBus thread. 499 // Note: SystemKeyEventListener depends on the DBus thread.
496 if (base::chromeos::IsRunningOnChromeOS() && 500 if (base::chromeos::IsRunningOnChromeOS() &&
497 !parameters().ui_task) { // ui_task is non-NULL when running tests. 501 !parameters().ui_task) { // ui_task is non-NULL when running tests.
498 SystemKeyEventListener::Initialize(); 502 SystemKeyEventListener::Initialize();
499 } 503 }
500 504
501 chromeos::DeviceOAuth2TokenServiceFactory::Initialize(); 505 DeviceOAuth2TokenServiceFactory::Initialize();
502 506
503 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun(); 507 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun();
504 } 508 }
505 509
506 void ChromeBrowserMainPartsChromeos::PreProfileInit() { 510 void ChromeBrowserMainPartsChromeos::PreProfileInit() {
507 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 511 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
508 // -- immediately before Profile creation(). 512 // -- immediately before Profile creation().
509 513
510 // Now that the file thread exists we can record our stats. 514 // Now that the file thread exists we can record our stats.
511 BootTimesLoader::Get()->RecordChromeMainStats(); 515 BootTimesLoader::Get()->RecordChromeMainStats();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 user_manager->SessionStarted(); 589 user_manager->SessionStarted();
586 } 590 }
587 591
588 if (!app_order_loader_) { 592 if (!app_order_loader_) {
589 app_order_loader_.reset( 593 app_order_loader_.reset(
590 new default_app_order::ExternalLoader(true /* async */)); 594 new default_app_order::ExternalLoader(true /* async */));
591 } 595 }
592 596
593 // Initialize magnification manager before ash tray is created. And this must 597 // Initialize magnification manager before ash tray is created. And this must
594 // be placed after UserManager::SessionStarted(); 598 // be placed after UserManager::SessionStarted();
595 chromeos::MagnificationManager::Initialize(); 599 MagnificationManager::Initialize();
596 600
597 // Add observers for WallpaperManager. This depends on PowerManagerClient, 601 // Add observers for WallpaperManager. This depends on PowerManagerClient,
598 // TimezoneSettings and CrosSettings. 602 // TimezoneSettings and CrosSettings.
599 WallpaperManager::Get()->AddObservers(); 603 WallpaperManager::Get()->AddObservers();
600 604
601 #if defined(USE_LINUX_BREAKPAD) 605 #if defined(USE_LINUX_BREAKPAD)
602 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, 606 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL,
603 base::Bind(&ChromeOSVersionCallback), 607 base::Bind(&ChromeOSVersionCallback),
604 &tracker_); 608 &tracker_);
605 #endif 609 #endif
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 BootTimesLoader::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true); 752 BootTimesLoader::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true);
749 753
750 g_browser_process->platform_part()->oom_priority_manager()->Stop(); 754 g_browser_process->platform_part()->oom_priority_manager()->Stop();
751 755
752 // Stops LoginUtils background fetchers. This is needed because IO thread is 756 // Stops LoginUtils background fetchers. This is needed because IO thread is
753 // going to stop soon after this function. The pending background jobs could 757 // going to stop soon after this function. The pending background jobs could
754 // cause it to crash during shutdown. 758 // cause it to crash during shutdown.
755 LoginUtils::Get()->StopBackgroundFetchers(); 759 LoginUtils::Get()->StopBackgroundFetchers();
756 760
757 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. 761 // Stops all in-flight OAuth2 token fetchers before the IO thread stops.
758 chromeos::DeviceOAuth2TokenServiceFactory::Shutdown(); 762 DeviceOAuth2TokenServiceFactory::Shutdown();
759 763
760 // Shutdown the upgrade detector for Chrome OS. The upgrade detector 764 // Shutdown the upgrade detector for Chrome OS. The upgrade detector
761 // stops monitoring changes from the update engine. 765 // stops monitoring changes from the update engine.
762 if (UpgradeDetectorChromeos::GetInstance()) 766 if (UpgradeDetectorChromeos::GetInstance())
763 UpgradeDetectorChromeos::GetInstance()->Shutdown(); 767 UpgradeDetectorChromeos::GetInstance()->Shutdown();
764 768
765 // Shutdown the network change notifier for Chrome OS. The network 769 // Shutdown the network change notifier for Chrome OS. The network
766 // change notifier stops monitoring changes from the power manager and 770 // change notifier stops monitoring changes from the power manager and
767 // the network manager. 771 // the network manager.
768 if (CrosNetworkChangeNotifierFactory::GetInstance()) 772 if (CrosNetworkChangeNotifierFactory::GetInstance())
(...skipping 16 matching lines...) Expand all
785 suspend_observer_.reset(); 789 suspend_observer_.reset();
786 resume_observer_.reset(); 790 resume_observer_.reset();
787 brightness_observer_.reset(); 791 brightness_observer_.reset();
788 retail_mode_power_save_blocker_.reset(); 792 retail_mode_power_save_blocker_.reset();
789 peripheral_battery_observer_.reset(); 793 peripheral_battery_observer_.reset();
790 794
791 // The XInput2 event listener needs to be shut down earlier than when 795 // The XInput2 event listener needs to be shut down earlier than when
792 // Singletons are finally destroyed in AtExitManager. 796 // Singletons are finally destroyed in AtExitManager.
793 XInputHierarchyChangedEventListener::GetInstance()->Stop(); 797 XInputHierarchyChangedEventListener::GetInstance()->Stop();
794 798
795 // chromeos::SystemKeyEventListener::Shutdown() is always safe to call, 799 // SystemKeyEventListener::Shutdown() is always safe to call,
796 // even if Initialize() wasn't called. 800 // even if Initialize() wasn't called.
797 SystemKeyEventListener::Shutdown(); 801 SystemKeyEventListener::Shutdown();
798 imageburner::BurnManager::Shutdown(); 802 imageburner::BurnManager::Shutdown();
799 if (CommandLine::ForCurrentProcess()-> 803 if (CommandLine::ForCurrentProcess()->
800 HasSwitch(ash::switches::kAshEnableNewAudioHandler)) { 804 HasSwitch(ash::switches::kAshEnableNewAudioHandler)) {
801 CrasAudioHandler::Shutdown(); 805 CrasAudioHandler::Shutdown();
802 } else { 806 } else {
803 AudioHandler::Shutdown(); 807 AudioHandler::Shutdown();
804 } 808 }
805 809
806 WebSocketProxyController::Shutdown(); 810 WebSocketProxyController::Shutdown();
807 811
808 // Let classes unregister themselves as observers of the ash::Shell singleton 812 // Let classes unregister themselves as observers of the ash::Shell singleton
809 // before the shell is destroyed. 813 // before the shell is destroyed.
810 user_activity_notifier_.reset(); 814 user_activity_notifier_.reset();
811 video_activity_notifier_.reset(); 815 video_activity_notifier_.reset();
812 display_configuration_observer_.reset(); 816 display_configuration_observer_.reset();
813 817
814 // Detach D-Bus clients before DBusThreadManager is shut down. 818 // Detach D-Bus clients before DBusThreadManager is shut down.
815 power_button_observer_.reset(); 819 power_button_observer_.reset();
816 screensaver_controller_.reset(); 820 screensaver_controller_.reset();
817 idle_action_warning_observer_.reset(); 821 idle_action_warning_observer_.reset();
818 822
819 // Delete ContactManager while |g_browser_process| is still alive. 823 // Delete ContactManager while |g_browser_process| is still alive.
820 contact_manager_.reset(); 824 contact_manager_.reset();
821 825
822 chromeos::MagnificationManager::Shutdown(); 826 MagnificationManager::Shutdown();
823 827
824 // Let the UserManager and WallpaperManager unregister itself as an observer 828 // Let the UserManager and WallpaperManager unregister itself as an observer
825 // of the CrosSettings singleton before it is destroyed. 829 // of the CrosSettings singleton before it is destroyed.
826 UserManager::Get()->Shutdown(); 830 UserManager::Get()->Shutdown();
827 WallpaperManager::Get()->Shutdown(); 831 WallpaperManager::Get()->Shutdown();
828 832
829 // Let the AutomaticRebootManager unregister itself as an observer of several 833 // Let the AutomaticRebootManager unregister itself as an observer of several
830 // subsystems. 834 // subsystems.
831 automatic_reboot_manager_.reset(); 835 automatic_reboot_manager_.reset();
832 836
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); 891 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0);
888 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); 892 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0);
889 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); 893 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0);
890 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); 894 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0);
891 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); 895 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0);
892 // This is necessary to start the experiment as a side effect. 896 // This is necessary to start the experiment as a side effect.
893 trial->group(); 897 trial->group();
894 } 898 }
895 899
896 } // namespace chromeos 900 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cert_library.h » ('j') | chrome/browser/chromeos/cros/cert_library.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698