| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 54 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 55 #include "chrome/browser/chromeos/login/login_wizard.h" | 55 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 56 #include "chrome/browser/chromeos/login/session/chrome_session_manager.h" | 56 #include "chrome/browser/chromeos/login/session/chrome_session_manager.h" |
| 57 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 57 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 58 #include "chrome/browser/chromeos/login/startup_utils.h" | 58 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 59 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 59 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 60 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 60 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
| 61 #include "chrome/browser/chromeos/login/wizard_controller.h" | 61 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 62 #include "chrome/browser/chromeos/net/network_connect_delegate_chromeos.h" | 62 #include "chrome/browser/chromeos/net/network_connect_delegate_chromeos.h" |
| 63 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" | 63 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" |
| 64 #include "chrome/browser/chromeos/net/network_pref_state_observer.h" |
| 64 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" | 65 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" |
| 65 #include "chrome/browser/chromeos/options/cert_library.h" | 66 #include "chrome/browser/chromeos/options/cert_library.h" |
| 66 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 67 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
| 67 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 68 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 68 #include "chrome/browser/chromeos/policy/device_local_account.h" | 69 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 69 #include "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h" | 70 #include "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h" |
| 70 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" | 71 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" |
| 71 #include "chrome/browser/chromeos/power/login_lock_state_notifier.h" | 72 #include "chrome/browser/chromeos/power/login_lock_state_notifier.h" |
| 72 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" | 73 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" |
| 73 #include "chrome/browser/chromeos/power/power_data_collector.h" | 74 #include "chrome/browser/chromeos/power/power_data_collector.h" |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 bool is_official_build = true; | 646 bool is_official_build = true; |
| 646 #else | 647 #else |
| 647 bool is_official_build = false; | 648 bool is_official_build = false; |
| 648 #endif | 649 #endif |
| 649 // Enable portal detector if EULA was previously accepted or if | 650 // Enable portal detector if EULA was previously accepted or if |
| 650 // this is an unofficial build. | 651 // this is an unofficial build. |
| 651 if (!is_official_build || StartupUtils::IsEulaAccepted()) | 652 if (!is_official_build || StartupUtils::IsEulaAccepted()) |
| 652 network_portal_detector::GetInstance()->Enable(true); | 653 network_portal_detector::GetInstance()->Enable(true); |
| 653 } | 654 } |
| 654 | 655 |
| 656 // Initialize an observer to update NetworkHandler's pref based services. |
| 657 network_pref_state_observer_ = base::MakeUnique<NetworkPrefStateObserver>(); |
| 658 |
| 655 // Initialize input methods. | 659 // Initialize input methods. |
| 656 input_method::InputMethodManager* manager = | 660 input_method::InputMethodManager* manager = |
| 657 input_method::InputMethodManager::Get(); | 661 input_method::InputMethodManager::Get(); |
| 658 UserSessionManager* session_manager = UserSessionManager::GetInstance(); | 662 UserSessionManager* session_manager = UserSessionManager::GetInstance(); |
| 659 DCHECK(manager); | 663 DCHECK(manager); |
| 660 DCHECK(session_manager); | 664 DCHECK(session_manager); |
| 661 | 665 |
| 662 manager->SetState(session_manager->GetDefaultIMEState(profile())); | 666 manager->SetState(session_manager->GetDefaultIMEState(profile())); |
| 663 | 667 |
| 664 bool is_running_test = parameters().ui_task != nullptr; | 668 bool is_running_test = parameters().ui_task != nullptr; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 // depend on. | 792 // depend on. |
| 789 data_promo_notification_.reset(); | 793 data_promo_notification_.reset(); |
| 790 | 794 |
| 791 // Tell DeviceSettingsService to stop talking to session_manager. Do not | 795 // Tell DeviceSettingsService to stop talking to session_manager. Do not |
| 792 // shutdown DeviceSettingsService yet, it might still be accessed by | 796 // shutdown DeviceSettingsService yet, it might still be accessed by |
| 793 // BrowserPolicyConnector (owned by g_browser_process). | 797 // BrowserPolicyConnector (owned by g_browser_process). |
| 794 DeviceSettingsService::Get()->UnsetSessionManager(); | 798 DeviceSettingsService::Get()->UnsetSessionManager(); |
| 795 | 799 |
| 796 // We should remove observers attached to D-Bus clients before | 800 // We should remove observers attached to D-Bus clients before |
| 797 // DBusThreadManager is shut down. | 801 // DBusThreadManager is shut down. |
| 802 network_pref_state_observer_.reset(); |
| 798 extension_volume_observer_.reset(); | 803 extension_volume_observer_.reset(); |
| 799 peripheral_battery_observer_.reset(); | 804 peripheral_battery_observer_.reset(); |
| 800 power_prefs_.reset(); | 805 power_prefs_.reset(); |
| 801 renderer_freezer_.reset(); | 806 renderer_freezer_.reset(); |
| 802 wake_on_wifi_manager_.reset(); | 807 wake_on_wifi_manager_.reset(); |
| 803 ScreenLocker::ShutDownClass(); | 808 ScreenLocker::ShutDownClass(); |
| 804 keyboard_event_rewriters_.reset(); | 809 keyboard_event_rewriters_.reset(); |
| 805 low_disk_notification_.reset(); | 810 low_disk_notification_.reset(); |
| 806 #if defined(USE_X11) | 811 #if defined(USE_X11) |
| 807 if (!chrome::IsRunningInMash()) { | 812 if (!chrome::IsRunningInMash()) { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 // Destroy DBus services immediately after threads are stopped. | 891 // Destroy DBus services immediately after threads are stopped. |
| 887 dbus_services_.reset(); | 892 dbus_services_.reset(); |
| 888 | 893 |
| 889 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 894 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 890 | 895 |
| 891 // Destroy DeviceSettingsService after g_browser_process. | 896 // Destroy DeviceSettingsService after g_browser_process. |
| 892 DeviceSettingsService::Shutdown(); | 897 DeviceSettingsService::Shutdown(); |
| 893 } | 898 } |
| 894 | 899 |
| 895 } // namespace chromeos | 900 } // namespace chromeos |
| OLD | NEW |