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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 NOTREACHED(); | 853 NOTREACHED(); |
854 break; | 854 break; |
855 } | 855 } |
856 } | 856 } |
857 | 857 |
858 void UserSessionManager::InitProfilePreferences( | 858 void UserSessionManager::InitProfilePreferences( |
859 Profile* profile, | 859 Profile* profile, |
860 const UserContext& user_context) { | 860 const UserContext& user_context) { |
861 const user_manager::User* user = | 861 const user_manager::User* user = |
862 ProfileHelper::Get()->GetUserByProfile(profile); | 862 ProfileHelper::Get()->GetUserByProfile(profile); |
| 863 if (user->GetType() == user_manager::USER_TYPE_KIOSK_APP && |
| 864 profile->IsNewProfile()) { |
| 865 ChromeUserManager::Get()->SetIsCurrentUserNew(true); |
| 866 } |
| 867 |
863 if (user->is_active()) { | 868 if (user->is_active()) { |
864 input_method::InputMethodManager* manager = | 869 input_method::InputMethodManager* manager = |
865 input_method::InputMethodManager::Get(); | 870 input_method::InputMethodManager::Get(); |
866 manager->SetState(GetDefaultIMEState(profile)); | 871 manager->SetState(GetDefaultIMEState(profile)); |
867 } | 872 } |
868 if (user_manager::UserManager::Get()->IsCurrentUserNew()) { | 873 if (user_manager::UserManager::Get()->IsCurrentUserNew()) { |
869 SetFirstLoginPrefs(profile, | 874 SetFirstLoginPrefs(profile, |
870 user_context.GetPublicSessionLocale(), | 875 user_context.GetPublicSessionLocale(), |
871 user_context.GetPublicSessionInputMethod()); | 876 user_context.GetPublicSessionInputMethod()); |
872 } | 877 } |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1537 default_ime_states_.erase(profile); | 1542 default_ime_states_.erase(profile); |
1538 } | 1543 } |
1539 | 1544 |
1540 void UserSessionManager::InjectStubUserContext( | 1545 void UserSessionManager::InjectStubUserContext( |
1541 const UserContext& user_context) { | 1546 const UserContext& user_context) { |
1542 injected_user_context_.reset(new UserContext(user_context)); | 1547 injected_user_context_.reset(new UserContext(user_context)); |
1543 authenticator_ = NULL; | 1548 authenticator_ = NULL; |
1544 } | 1549 } |
1545 | 1550 |
1546 } // namespace chromeos | 1551 } // namespace chromeos |
OLD | NEW |