| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/login/session/user_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 #include "chrome/browser/net/nss_context.h" | 69 #include "chrome/browser/net/nss_context.h" |
| 70 #include "chrome/browser/prefs/session_startup_pref.h" | 70 #include "chrome/browser/prefs/session_startup_pref.h" |
| 71 #include "chrome/browser/profiles/profile.h" | 71 #include "chrome/browser/profiles/profile.h" |
| 72 #include "chrome/browser/profiles/profile_manager.h" | 72 #include "chrome/browser/profiles/profile_manager.h" |
| 73 #include "chrome/browser/signin/account_tracker_service_factory.h" | 73 #include "chrome/browser/signin/account_tracker_service_factory.h" |
| 74 #include "chrome/browser/signin/easy_unlock_service.h" | 74 #include "chrome/browser/signin/easy_unlock_service.h" |
| 75 #include "chrome/browser/signin/signin_manager_factory.h" | 75 #include "chrome/browser/signin/signin_manager_factory.h" |
| 76 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" | 76 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
| 77 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa
ctory.h" | 77 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa
ctory.h" |
| 78 #include "chrome/browser/ui/app_list/start_page_service.h" | 78 #include "chrome/browser/ui/app_list/start_page_service.h" |
| 79 #include "chrome/browser/ui/ash/ash_util.h" |
| 79 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 80 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
| 80 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 81 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 81 #include "chrome/common/chrome_switches.h" | 82 #include "chrome/common/chrome_switches.h" |
| 82 #include "chrome/common/logging_chrome.h" | 83 #include "chrome/common/logging_chrome.h" |
| 83 #include "chrome/common/pref_names.h" | 84 #include "chrome/common/pref_names.h" |
| 84 #include "chromeos/cert_loader.h" | 85 #include "chromeos/cert_loader.h" |
| 85 #include "chromeos/chromeos_switches.h" | 86 #include "chromeos/chromeos_switches.h" |
| 86 #include "chromeos/cryptohome/cryptohome_parameters.h" | 87 #include "chromeos/cryptohome/cryptohome_parameters.h" |
| 87 #include "chromeos/cryptohome/cryptohome_util.h" | 88 #include "chromeos/cryptohome/cryptohome_util.h" |
| 88 #include "chromeos/dbus/cryptohome_client.h" | 89 #include "chromeos/dbus/cryptohome_client.h" |
| (...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1719 chromeos::BootTimesRecorder::Get()->LoginDone( | 1720 chromeos::BootTimesRecorder::Get()->LoginDone( |
| 1720 user_manager::UserManager::Get()->IsCurrentUserNew()); | 1721 user_manager::UserManager::Get()->IsCurrentUserNew()); |
| 1721 } | 1722 } |
| 1722 | 1723 |
| 1723 void UserSessionManager::RespectLocalePreferenceWrapper( | 1724 void UserSessionManager::RespectLocalePreferenceWrapper( |
| 1724 Profile* profile, | 1725 Profile* profile, |
| 1725 const base::Closure& callback) { | 1726 const base::Closure& callback) { |
| 1726 if (browser_shutdown::IsTryingToQuit()) | 1727 if (browser_shutdown::IsTryingToQuit()) |
| 1727 return; | 1728 return; |
| 1728 | 1729 |
| 1730 // InputEventsBlocker is not available in Mash |
| 1731 if (chrome::IsRunningInMash()) { |
| 1732 callback.Run(); |
| 1733 return; |
| 1734 } |
| 1735 |
| 1729 const user_manager::User* const user = | 1736 const user_manager::User* const user = |
| 1730 ProfileHelper::Get()->GetUserByProfile(profile); | 1737 ProfileHelper::Get()->GetUserByProfile(profile); |
| 1731 locale_util::SwitchLanguageCallback locale_switched_callback(base::Bind( | 1738 locale_util::SwitchLanguageCallback locale_switched_callback(base::Bind( |
| 1732 &UserSessionManager::RunCallbackOnLocaleLoaded, callback, | 1739 &UserSessionManager::RunCallbackOnLocaleLoaded, callback, |
| 1733 base::Owned(new InputEventsBlocker))); // Block UI events until | 1740 base::Owned(new InputEventsBlocker))); // Block UI events until |
| 1734 // the ResourceBundle is | 1741 // the ResourceBundle is |
| 1735 // reloaded. | 1742 // reloaded. |
| 1736 if (!RespectLocalePreference(profile, user, locale_switched_callback)) | 1743 if (!RespectLocalePreference(profile, user, locale_switched_callback)) |
| 1737 callback.Run(); | 1744 callback.Run(); |
| 1738 } | 1745 } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1824 token_handle_util_.reset(); | 1831 token_handle_util_.reset(); |
| 1825 first_run::GoodiesDisplayer::Delete(); | 1832 first_run::GoodiesDisplayer::Delete(); |
| 1826 } | 1833 } |
| 1827 | 1834 |
| 1828 void UserSessionManager::CreateTokenUtilIfMissing() { | 1835 void UserSessionManager::CreateTokenUtilIfMissing() { |
| 1829 if (!token_handle_util_.get()) | 1836 if (!token_handle_util_.get()) |
| 1830 token_handle_util_.reset(new TokenHandleUtil()); | 1837 token_handle_util_.reset(new TokenHandleUtil()); |
| 1831 } | 1838 } |
| 1832 | 1839 |
| 1833 } // namespace chromeos | 1840 } // namespace chromeos |
| OLD | NEW |