| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "chrome/browser/chromeos/language_preferences.h" | 43 #include "chrome/browser/chromeos/language_preferences.h" |
| 44 #include "chrome/browser/chromeos/login/helper.h" | 44 #include "chrome/browser/chromeos/login/helper.h" |
| 45 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 45 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 46 #include "chrome/browser/chromeos/login/login_wizard.h" | 46 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 47 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 47 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 48 #include "chrome/browser/chromeos/login/startup_utils.h" | 48 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 49 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 49 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 50 #include "chrome/browser/chromeos/login/wizard_controller.h" | 50 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 51 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" | 51 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" |
| 52 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" | 52 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" |
| 53 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" |
| 53 #include "chrome/browser/chromeos/options/cert_library.h" | 54 #include "chrome/browser/chromeos/options/cert_library.h" |
| 54 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 55 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
| 55 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 56 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 56 #include "chrome/browser/chromeos/policy/device_local_account.h" | 57 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 57 #include "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h" | 58 #include "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h" |
| 58 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" | 59 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" |
| 59 #include "chrome/browser/chromeos/power/light_bar.h" | 60 #include "chrome/browser/chromeos/power/light_bar.h" |
| 60 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" | 61 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" |
| 61 #include "chrome/browser/chromeos/power/power_button_observer.h" | 62 #include "chrome/browser/chromeos/power/power_button_observer.h" |
| 62 #include "chrome/browser/chromeos/power/power_data_collector.h" | 63 #include "chrome/browser/chromeos/power/power_data_collector.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( | 337 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( |
| 337 content::BrowserThread::GetMessageLoopProxyForThread( | 338 content::BrowserThread::GetMessageLoopProxyForThread( |
| 338 content::BrowserThread::FILE), | 339 content::BrowserThread::FILE), |
| 339 load_oem_statistics); | 340 load_oem_statistics); |
| 340 | 341 |
| 341 base::FilePath downloads_directory; | 342 base::FilePath downloads_directory; |
| 342 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); | 343 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); |
| 343 | 344 |
| 344 DeviceOAuth2TokenServiceFactory::Initialize(); | 345 DeviceOAuth2TokenServiceFactory::Initialize(); |
| 345 | 346 |
| 347 wake_on_wifi_manager_.reset(new WakeOnWifiManager()); |
| 348 |
| 346 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun(); | 349 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun(); |
| 347 } | 350 } |
| 348 | 351 |
| 349 void ChromeBrowserMainPartsChromeos::PreProfileInit() { | 352 void ChromeBrowserMainPartsChromeos::PreProfileInit() { |
| 350 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 353 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 351 // -- immediately before Profile creation(). | 354 // -- immediately before Profile creation(). |
| 352 | 355 |
| 353 // Now that the file thread exists we can record our stats. | 356 // Now that the file thread exists we can record our stats. |
| 354 BootTimesLoader::Get()->RecordChromeMainStats(); | 357 BootTimesLoader::Get()->RecordChromeMainStats(); |
| 355 LoginEventRecorder::Get()->SetDelegate(BootTimesLoader::Get()); | 358 LoginEventRecorder::Get()->SetDelegate(BootTimesLoader::Get()); |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 DeviceSettingsService::Get()->UnsetSessionManager(); | 698 DeviceSettingsService::Get()->UnsetSessionManager(); |
| 696 | 699 |
| 697 // We should remove observers attached to D-Bus clients before | 700 // We should remove observers attached to D-Bus clients before |
| 698 // DBusThreadManager is shut down. | 701 // DBusThreadManager is shut down. |
| 699 extension_system_event_observer_.reset(); | 702 extension_system_event_observer_.reset(); |
| 700 retail_mode_power_save_blocker_.reset(); | 703 retail_mode_power_save_blocker_.reset(); |
| 701 peripheral_battery_observer_.reset(); | 704 peripheral_battery_observer_.reset(); |
| 702 power_prefs_.reset(); | 705 power_prefs_.reset(); |
| 703 renderer_freezer_.reset(); | 706 renderer_freezer_.reset(); |
| 704 light_bar_.reset(); | 707 light_bar_.reset(); |
| 708 wake_on_wifi_manager_.reset(); |
| 705 | 709 |
| 706 // Let the ScreenLocker unregister itself from SessionManagerClient before | 710 // Let the ScreenLocker unregister itself from SessionManagerClient before |
| 707 // DBusThreadManager is shut down. | 711 // DBusThreadManager is shut down. |
| 708 if (!KioskModeSettings::Get()->IsKioskModeEnabled()) | 712 if (!KioskModeSettings::Get()->IsKioskModeEnabled()) |
| 709 ScreenLocker::ShutDownClass(); | 713 ScreenLocker::ShutDownClass(); |
| 710 | 714 |
| 711 keyboard_event_rewriters_.reset(); | 715 keyboard_event_rewriters_.reset(); |
| 712 #if defined(USE_X11) | 716 #if defined(USE_X11) |
| 713 // The XInput2 event listener needs to be shut down earlier than when | 717 // The XInput2 event listener needs to be shut down earlier than when |
| 714 // Singletons are finally destroyed in AtExitManager. | 718 // Singletons are finally destroyed in AtExitManager. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 // Destroy DBus services immediately after threads are stopped. | 791 // Destroy DBus services immediately after threads are stopped. |
| 788 dbus_services_.reset(); | 792 dbus_services_.reset(); |
| 789 | 793 |
| 790 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 794 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 791 | 795 |
| 792 // Destroy DeviceSettingsService after g_browser_process. | 796 // Destroy DeviceSettingsService after g_browser_process. |
| 793 DeviceSettingsService::Shutdown(); | 797 DeviceSettingsService::Shutdown(); |
| 794 } | 798 } |
| 795 | 799 |
| 796 } // namespace chromeos | 800 } // namespace chromeos |
| OLD | NEW |