| OLD | NEW |
| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "chrome/browser/chromeos/language_preferences.h" | 47 #include "chrome/browser/chromeos/language_preferences.h" |
| 48 #include "chrome/browser/chromeos/login/helper.h" | 48 #include "chrome/browser/chromeos/login/helper.h" |
| 49 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 49 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 50 #include "chrome/browser/chromeos/login/login_wizard.h" | 50 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 51 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 51 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 52 #include "chrome/browser/chromeos/login/startup_utils.h" | 52 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 53 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 53 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 54 #include "chrome/browser/chromeos/login/wizard_controller.h" | 54 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 55 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" | 55 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" |
| 56 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" | 56 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" |
| 57 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" |
| 57 #include "chrome/browser/chromeos/options/cert_library.h" | 58 #include "chrome/browser/chromeos/options/cert_library.h" |
| 58 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 59 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
| 59 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 60 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 60 #include "chrome/browser/chromeos/policy/device_local_account.h" | 61 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 61 #include "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h" | 62 #include "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h" |
| 62 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" | 63 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" |
| 63 #include "chrome/browser/chromeos/power/light_bar.h" | 64 #include "chrome/browser/chromeos/power/light_bar.h" |
| 64 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" | 65 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" |
| 65 #include "chrome/browser/chromeos/power/power_button_observer.h" | 66 #include "chrome/browser/chromeos/power/power_button_observer.h" |
| 66 #include "chrome/browser/chromeos/power/power_data_collector.h" | 67 #include "chrome/browser/chromeos/power/power_data_collector.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( | 360 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( |
| 360 content::BrowserThread::GetMessageLoopProxyForThread( | 361 content::BrowserThread::GetMessageLoopProxyForThread( |
| 361 content::BrowserThread::FILE), | 362 content::BrowserThread::FILE), |
| 362 load_oem_statistics); | 363 load_oem_statistics); |
| 363 | 364 |
| 364 base::FilePath downloads_directory; | 365 base::FilePath downloads_directory; |
| 365 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); | 366 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); |
| 366 | 367 |
| 367 DeviceOAuth2TokenServiceFactory::Initialize(); | 368 DeviceOAuth2TokenServiceFactory::Initialize(); |
| 368 | 369 |
| 370 wake_on_wifi_manager_.reset(new WakeOnWifiManager()); |
| 371 |
| 369 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun(); | 372 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun(); |
| 370 } | 373 } |
| 371 | 374 |
| 372 void ChromeBrowserMainPartsChromeos::PreProfileInit() { | 375 void ChromeBrowserMainPartsChromeos::PreProfileInit() { |
| 373 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 376 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 374 // -- immediately before Profile creation(). | 377 // -- immediately before Profile creation(). |
| 375 | 378 |
| 376 // Now that the file thread exists we can record our stats. | 379 // Now that the file thread exists we can record our stats. |
| 377 BootTimesLoader::Get()->RecordChromeMainStats(); | 380 BootTimesLoader::Get()->RecordChromeMainStats(); |
| 378 LoginEventRecorder::Get()->SetDelegate(BootTimesLoader::Get()); | 381 LoginEventRecorder::Get()->SetDelegate(BootTimesLoader::Get()); |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 DeviceSettingsService::Get()->UnsetSessionManager(); | 720 DeviceSettingsService::Get()->UnsetSessionManager(); |
| 718 | 721 |
| 719 // We should remove observers attached to D-Bus clients before | 722 // We should remove observers attached to D-Bus clients before |
| 720 // DBusThreadManager is shut down. | 723 // DBusThreadManager is shut down. |
| 721 extension_system_event_observer_.reset(); | 724 extension_system_event_observer_.reset(); |
| 722 retail_mode_power_save_blocker_.reset(); | 725 retail_mode_power_save_blocker_.reset(); |
| 723 peripheral_battery_observer_.reset(); | 726 peripheral_battery_observer_.reset(); |
| 724 power_prefs_.reset(); | 727 power_prefs_.reset(); |
| 725 renderer_freezer_.reset(); | 728 renderer_freezer_.reset(); |
| 726 light_bar_.reset(); | 729 light_bar_.reset(); |
| 730 wake_on_wifi_manager_.reset(); |
| 727 | 731 |
| 728 // Let the ScreenLocker unregister itself from SessionManagerClient before | 732 // Let the ScreenLocker unregister itself from SessionManagerClient before |
| 729 // DBusThreadManager is shut down. | 733 // DBusThreadManager is shut down. |
| 730 if (!KioskModeSettings::Get()->IsKioskModeEnabled()) | 734 if (!KioskModeSettings::Get()->IsKioskModeEnabled()) |
| 731 ScreenLocker::ShutDownClass(); | 735 ScreenLocker::ShutDownClass(); |
| 732 | 736 |
| 733 keyboard_event_rewriters_.reset(); | 737 keyboard_event_rewriters_.reset(); |
| 734 #if defined(USE_X11) | 738 #if defined(USE_X11) |
| 735 // The XInput2 event listener needs to be shut down earlier than when | 739 // The XInput2 event listener needs to be shut down earlier than when |
| 736 // Singletons are finally destroyed in AtExitManager. | 740 // Singletons are finally destroyed in AtExitManager. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 // Destroy DBus services immediately after threads are stopped. | 813 // Destroy DBus services immediately after threads are stopped. |
| 810 dbus_services_.reset(); | 814 dbus_services_.reset(); |
| 811 | 815 |
| 812 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 816 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 813 | 817 |
| 814 // Destroy DeviceSettingsService after g_browser_process. | 818 // Destroy DeviceSettingsService after g_browser_process. |
| 815 DeviceSettingsService::Shutdown(); | 819 DeviceSettingsService::Shutdown(); |
| 816 } | 820 } |
| 817 | 821 |
| 818 } // namespace chromeos | 822 } // namespace chromeos |
| OLD | NEW |