| 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 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1729 if (ShouldShowEolNotification(profile)) | 1729 if (ShouldShowEolNotification(profile)) |
| 1730 CheckEolStatus(profile); | 1730 CheckEolStatus(profile); |
| 1731 } | 1731 } |
| 1732 | 1732 |
| 1733 void UserSessionManager::RespectLocalePreferenceWrapper( | 1733 void UserSessionManager::RespectLocalePreferenceWrapper( |
| 1734 Profile* profile, | 1734 Profile* profile, |
| 1735 const base::Closure& callback) { | 1735 const base::Closure& callback) { |
| 1736 if (browser_shutdown::IsTryingToQuit()) | 1736 if (browser_shutdown::IsTryingToQuit()) |
| 1737 return; | 1737 return; |
| 1738 | 1738 |
| 1739 // InputEventsBlocker is not available in Mash | |
| 1740 if (chrome::IsRunningInMash()) { | |
| 1741 callback.Run(); | |
| 1742 return; | |
| 1743 } | |
| 1744 | |
| 1745 const user_manager::User* const user = | 1739 const user_manager::User* const user = |
| 1746 ProfileHelper::Get()->GetUserByProfile(profile); | 1740 ProfileHelper::Get()->GetUserByProfile(profile); |
| 1747 locale_util::SwitchLanguageCallback locale_switched_callback(base::Bind( | 1741 locale_util::SwitchLanguageCallback locale_switched_callback(base::Bind( |
| 1748 &UserSessionManager::RunCallbackOnLocaleLoaded, callback, | 1742 &UserSessionManager::RunCallbackOnLocaleLoaded, callback, |
| 1749 base::Owned(new InputEventsBlocker))); // Block UI events until | 1743 base::Owned(new InputEventsBlocker))); // Block UI events until |
| 1750 // the ResourceBundle is | 1744 // the ResourceBundle is |
| 1751 // reloaded. | 1745 // reloaded. |
| 1752 if (!RespectLocalePreference(profile, user, locale_switched_callback)) | 1746 if (!RespectLocalePreference(profile, user, locale_switched_callback)) |
| 1753 callback.Run(); | 1747 callback.Run(); |
| 1754 } | 1748 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1851 ->browser_policy_connector_chromeos() | 1845 ->browser_policy_connector_chromeos() |
| 1852 ->IsEnterpriseManaged()) { | 1846 ->IsEnterpriseManaged()) { |
| 1853 return false; | 1847 return false; |
| 1854 } | 1848 } |
| 1855 | 1849 |
| 1856 // Do not show end of life notification if this is a guest session | 1850 // Do not show end of life notification if this is a guest session |
| 1857 return !profile->IsGuestSession(); | 1851 return !profile->IsGuestSession(); |
| 1858 } | 1852 } |
| 1859 | 1853 |
| 1860 } // namespace chromeos | 1854 } // namespace chromeos |
| OLD | NEW |