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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 // are set up when the user first logs in. Then the user may customize the | 602 // are set up when the user first logs in. Then the user may customize the |
603 // input methods. Hence changing input methods here, just because the user's | 603 // input methods. Hence changing input methods here, just because the user's |
604 // UI language is different from the login screen UI language, is not | 604 // UI language is different from the login screen UI language, is not |
605 // desirable. Note that input method preferences are synced, so users can use | 605 // desirable. Note that input method preferences are synced, so users can use |
606 // their farovite input methods as soon as the preferences are synced. | 606 // their farovite input methods as soon as the preferences are synced. |
607 // | 607 // |
608 // For Guest mode, user locale preferences will never get initialized. | 608 // For Guest mode, user locale preferences will never get initialized. |
609 // So input methods should be enabled somewhere. | 609 // So input methods should be enabled somewhere. |
610 const bool enable_layouts = | 610 const bool enable_layouts = |
611 user_manager::UserManager::Get()->IsLoggedInAsGuest(); | 611 user_manager::UserManager::Get()->IsLoggedInAsGuest(); |
612 locale_util::SwitchLanguage( | 612 locale_util::SwitchLanguage(pref_locale, enable_layouts, |
613 pref_locale, enable_layouts, false /* login_layouts_only */, callback); | 613 false /* login_layouts_only */, callback, |
| 614 profile); |
614 | 615 |
615 return true; | 616 return true; |
616 } | 617 } |
617 | 618 |
618 bool UserSessionManager::RestartToApplyPerSessionFlagsIfNeed( | 619 bool UserSessionManager::RestartToApplyPerSessionFlagsIfNeed( |
619 Profile* profile, | 620 Profile* profile, |
620 bool early_restart) { | 621 bool early_restart) { |
621 if (ProfileHelper::IsSigninProfile(profile)) | 622 if (ProfileHelper::IsSigninProfile(profile)) |
622 return false; | 623 return false; |
623 | 624 |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 if (is_enterprise_managed) | 1658 if (is_enterprise_managed) |
1658 display = USER_PODS_DISPLAY_DISABLED_MANAGED; | 1659 display = USER_PODS_DISPLAY_DISABLED_MANAGED; |
1659 else | 1660 else |
1660 display = USER_PODS_DISPLAY_DISABLED_REGULAR; | 1661 display = USER_PODS_DISPLAY_DISABLED_REGULAR; |
1661 } | 1662 } |
1662 UMA_HISTOGRAM_ENUMERATION("UserSessionManager.UserPodsDisplay", display, | 1663 UMA_HISTOGRAM_ENUMERATION("UserSessionManager.UserPodsDisplay", display, |
1663 NUM_USER_PODS_DISPLAY); | 1664 NUM_USER_PODS_DISPLAY); |
1664 } | 1665 } |
1665 | 1666 |
1666 } // namespace chromeos | 1667 } // namespace chromeos |
OLD | NEW |