| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "chrome/browser/chromeos/power/power_data_collector.h" | 71 #include "chrome/browser/chromeos/power/power_data_collector.h" |
| 72 #include "chrome/browser/chromeos/power/power_prefs.h" | 72 #include "chrome/browser/chromeos/power/power_prefs.h" |
| 73 #include "chrome/browser/chromeos/power/renderer_freezer.h" | 73 #include "chrome/browser/chromeos/power/renderer_freezer.h" |
| 74 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 74 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 75 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" | 75 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" |
| 76 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" | 76 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" |
| 77 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 77 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 78 #include "chrome/browser/chromeos/status/data_promo_notification.h" | 78 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
| 79 #include "chrome/browser/chromeos/system/input_device_settings.h" | 79 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 80 #include "chrome/browser/chromeos/ui/low_disk_notification.h" | 80 #include "chrome/browser/chromeos/ui/low_disk_notification.h" |
| 81 #include "chrome/browser/chromeos/ui/password_echo_controller.h" |
| 81 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 82 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
| 82 #include "chrome/browser/defaults.h" | 83 #include "chrome/browser/defaults.h" |
| 83 #include "chrome/browser/lifetime/application_lifetime.h" | 84 #include "chrome/browser/lifetime/application_lifetime.h" |
| 84 #include "chrome/browser/net/chrome_network_delegate.h" | 85 #include "chrome/browser/net/chrome_network_delegate.h" |
| 85 #include "chrome/browser/profiles/profile.h" | 86 #include "chrome/browser/profiles/profile.h" |
| 86 #include "chrome/browser/profiles/profile_manager.h" | 87 #include "chrome/browser/profiles/profile_manager.h" |
| 87 #include "chrome/browser/ui/ash/ash_util.h" | 88 #include "chrome/browser/ui/ash/ash_util.h" |
| 88 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" | 89 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" |
| 89 #include "chrome/common/channel_info.h" | 90 #include "chrome/common/channel_info.h" |
| 90 #include "chrome/common/chrome_constants.h" | 91 #include "chrome/common/chrome_constants.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 | 647 |
| 647 // Initialize input methods. | 648 // Initialize input methods. |
| 648 input_method::InputMethodManager* manager = | 649 input_method::InputMethodManager* manager = |
| 649 input_method::InputMethodManager::Get(); | 650 input_method::InputMethodManager::Get(); |
| 650 UserSessionManager* session_manager = UserSessionManager::GetInstance(); | 651 UserSessionManager* session_manager = UserSessionManager::GetInstance(); |
| 651 DCHECK(manager); | 652 DCHECK(manager); |
| 652 DCHECK(session_manager); | 653 DCHECK(session_manager); |
| 653 | 654 |
| 654 manager->SetState(session_manager->GetDefaultIMEState(profile())); | 655 manager->SetState(session_manager->GetDefaultIMEState(profile())); |
| 655 | 656 |
| 657 // Creates PasswordEchoController before SessionManager starts so that |
| 658 // the login screen is covered as well. |
| 659 password_echo_controller_.reset(new PasswordEchoController); |
| 660 |
| 656 bool is_running_test = parameters().ui_task != nullptr; | 661 bool is_running_test = parameters().ui_task != nullptr; |
| 657 g_browser_process->platform_part()->InitializeSessionManager( | 662 g_browser_process->platform_part()->InitializeSessionManager( |
| 658 parsed_command_line(), profile(), is_running_test); | 663 parsed_command_line(), profile(), is_running_test); |
| 659 g_browser_process->platform_part()->SessionManager()->Start(); | 664 g_browser_process->platform_part()->SessionManager()->Start(); |
| 660 | 665 |
| 661 // Guest user profile is never initialized with locale settings, | 666 // Guest user profile is never initialized with locale settings, |
| 662 // so we need special handling for Guest session. | 667 // so we need special handling for Guest session. |
| 663 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) | 668 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) |
| 664 SetGuestLocale(profile()); | 669 SetGuestLocale(profile()); |
| 665 | 670 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 | 840 |
| 836 // Make sure that there is no pending URLRequests. | 841 // Make sure that there is no pending URLRequests. |
| 837 UserSessionManager::GetInstance()->Shutdown(); | 842 UserSessionManager::GetInstance()->Shutdown(); |
| 838 | 843 |
| 839 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers | 844 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers |
| 840 // on services that are going to be deleted later but before its Shutdown() | 845 // on services that are going to be deleted later but before its Shutdown() |
| 841 // is called. | 846 // is called. |
| 842 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> | 847 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> |
| 843 PreShutdown(); | 848 PreShutdown(); |
| 844 | 849 |
| 850 // Resets PasswordEchoController before ash shuts down. |
| 851 password_echo_controller_.reset(); |
| 852 |
| 845 // We first call PostMainMessageLoopRun and then destroy UserManager, because | 853 // We first call PostMainMessageLoopRun and then destroy UserManager, because |
| 846 // Ash needs to be closed before UserManager is destroyed. | 854 // Ash needs to be closed before UserManager is destroyed. |
| 847 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 855 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
| 848 | 856 |
| 849 if (!chrome::IsRunningInMash()) | 857 if (!chrome::IsRunningInMash()) |
| 850 AccessibilityManager::Shutdown(); | 858 AccessibilityManager::Shutdown(); |
| 851 | 859 |
| 852 input_method::Shutdown(); | 860 input_method::Shutdown(); |
| 853 | 861 |
| 854 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. | 862 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 874 // Destroy DBus services immediately after threads are stopped. | 882 // Destroy DBus services immediately after threads are stopped. |
| 875 dbus_services_.reset(); | 883 dbus_services_.reset(); |
| 876 | 884 |
| 877 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 885 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 878 | 886 |
| 879 // Destroy DeviceSettingsService after g_browser_process. | 887 // Destroy DeviceSettingsService after g_browser_process. |
| 880 DeviceSettingsService::Shutdown(); | 888 DeviceSettingsService::Shutdown(); |
| 881 } | 889 } |
| 882 | 890 |
| 883 } // namespace chromeos | 891 } // namespace chromeos |
| OLD | NEW |