| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/user_manager_impl.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 void UserManagerImpl::NotifyOnLogin() { | 1107 void UserManagerImpl::NotifyOnLogin() { |
| 1108 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1108 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1109 NotifyActiveUserHashChanged(active_user_->username_hash()); | 1109 NotifyActiveUserHashChanged(active_user_->username_hash()); |
| 1110 | 1110 |
| 1111 UpdateLoginState(); | 1111 UpdateLoginState(); |
| 1112 content::NotificationService::current()->Notify( | 1112 content::NotificationService::current()->Notify( |
| 1113 chrome::NOTIFICATION_LOGIN_USER_CHANGED, | 1113 chrome::NOTIFICATION_LOGIN_USER_CHANGED, |
| 1114 content::Source<UserManager>(this), | 1114 content::Source<UserManager>(this), |
| 1115 content::Details<const User>(active_user_)); | 1115 content::Details<const User>(active_user_)); |
| 1116 | 1116 |
| 1117 CrosLibrary::Get()->GetCertLibrary()->LoadKeyStore(); | |
| 1118 | |
| 1119 // Indicate to DeviceSettingsService that the owner key may have become | 1117 // Indicate to DeviceSettingsService that the owner key may have become |
| 1120 // available. | 1118 // available. |
| 1121 DeviceSettingsService::Get()->SetUsername(active_user_->email()); | 1119 DeviceSettingsService::Get()->SetUsername(active_user_->email()); |
| 1122 } | 1120 } |
| 1123 | 1121 |
| 1124 void UserManagerImpl::UpdateOwnership( | 1122 void UserManagerImpl::UpdateOwnership( |
| 1125 DeviceSettingsService::OwnershipStatus status, | 1123 DeviceSettingsService::OwnershipStatus status, |
| 1126 bool is_owner) { | 1124 bool is_owner) { |
| 1127 VLOG(1) << "Current user " << (is_owner ? "is owner" : "is not owner"); | 1125 VLOG(1) << "Current user " << (is_owner ? "is owner" : "is not owner"); |
| 1128 | 1126 |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 login_user_type = LoginState::LOGGED_IN_USER_LOCALLY_MANAGED; | 1449 login_user_type = LoginState::LOGGED_IN_USER_LOCALLY_MANAGED; |
| 1452 else if (active_user_->GetType() == User::USER_TYPE_KIOSK_APP) | 1450 else if (active_user_->GetType() == User::USER_TYPE_KIOSK_APP) |
| 1453 login_user_type = LoginState::LOGGED_IN_USER_KIOSK_APP; | 1451 login_user_type = LoginState::LOGGED_IN_USER_KIOSK_APP; |
| 1454 else | 1452 else |
| 1455 login_user_type = LoginState::LOGGED_IN_USER_REGULAR; | 1453 login_user_type = LoginState::LOGGED_IN_USER_REGULAR; |
| 1456 | 1454 |
| 1457 LoginState::Get()->SetLoggedInState(logged_in_state, login_user_type); | 1455 LoginState::Get()->SetLoggedInState(logged_in_state, login_user_type); |
| 1458 } | 1456 } |
| 1459 | 1457 |
| 1460 } // namespace chromeos | 1458 } // namespace chromeos |
| OLD | NEW |