| 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 | 806 |
| 807 // Initialize various services only for primary user. | 807 // Initialize various services only for primary user. |
| 808 const user_manager::User* user = | 808 const user_manager::User* user = |
| 809 ProfileHelper::Get()->GetUserByProfile(profile); | 809 ProfileHelper::Get()->GetUserByProfile(profile); |
| 810 if (user_manager->GetPrimaryUser() == user) { | 810 if (user_manager->GetPrimaryUser() == user) { |
| 811 InitRlz(profile); | 811 InitRlz(profile); |
| 812 InitializeCerts(profile); | 812 InitializeCerts(profile); |
| 813 InitializeCRLSetFetcher(user); | 813 InitializeCRLSetFetcher(user); |
| 814 } | 814 } |
| 815 | 815 |
| 816 if (user && user->GetType() == user_manager::USER_TYPE_REGULAR && |
| 817 EasyUnlockService::Get(profile)) |
| 818 EasyUnlockService::Get(profile)->SetHardlocked(false); |
| 819 |
| 816 UpdateEasyUnlockKeys(profile); | 820 UpdateEasyUnlockKeys(profile); |
| 817 user_context_.ClearSecrets(); | 821 user_context_.ClearSecrets(); |
| 818 | 822 |
| 819 // TODO(nkostylev): This pointer should probably never be NULL, but it looks | 823 // TODO(nkostylev): This pointer should probably never be NULL, but it looks |
| 820 // like LoginUtilsImpl::OnProfileCreated() may be getting called before | 824 // like LoginUtilsImpl::OnProfileCreated() may be getting called before |
| 821 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is | 825 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is |
| 822 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace | 826 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace |
| 823 // this 'if' statement with a CHECK(delegate_) once the underlying issue is | 827 // this 'if' statement with a CHECK(delegate_) once the underlying issue is |
| 824 // resolved. | 828 // resolved. |
| 825 if (delegate_) | 829 if (delegate_) |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 return NULL; | 1106 return NULL; |
| 1103 } | 1107 } |
| 1104 | 1108 |
| 1105 if (!easy_unlock_key_manager_) | 1109 if (!easy_unlock_key_manager_) |
| 1106 easy_unlock_key_manager_.reset(new EasyUnlockKeyManager); | 1110 easy_unlock_key_manager_.reset(new EasyUnlockKeyManager); |
| 1107 | 1111 |
| 1108 return easy_unlock_key_manager_.get(); | 1112 return easy_unlock_key_manager_.get(); |
| 1109 } | 1113 } |
| 1110 | 1114 |
| 1111 } // namespace chromeos | 1115 } // namespace chromeos |
| OLD | NEW |