| 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/users/chrome_user_manager.h" | 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "ash/multi_profile_uma.h" | 10 #include "ash/multi_profile_uma.h" |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 WallpaperManager::Get()->OnPolicyFetched(policy, user_id, data.Pass()); | 410 WallpaperManager::Get()->OnPolicyFetched(policy, user_id, data.Pass()); |
| 411 else | 411 else |
| 412 NOTREACHED(); | 412 NOTREACHED(); |
| 413 } | 413 } |
| 414 | 414 |
| 415 void ChromeUserManager::OnPolicyUpdated(const std::string& user_id) { | 415 void ChromeUserManager::OnPolicyUpdated(const std::string& user_id) { |
| 416 const user_manager::User* user = FindUser(user_id); | 416 const user_manager::User* user = FindUser(user_id); |
| 417 if (!user || user->GetType() != user_manager::USER_TYPE_PUBLIC_ACCOUNT) | 417 if (!user || user->GetType() != user_manager::USER_TYPE_PUBLIC_ACCOUNT) |
| 418 return; | 418 return; |
| 419 UpdatePublicAccountDisplayName(user_id); | 419 UpdatePublicAccountDisplayName(user_id); |
| 420 NotifyUserListChanged(); | |
| 421 } | 420 } |
| 422 | 421 |
| 423 void ChromeUserManager::OnDeviceLocalAccountsChanged() { | 422 void ChromeUserManager::OnDeviceLocalAccountsChanged() { |
| 424 // No action needed here, changes to the list of device-local accounts get | 423 // No action needed here, changes to the list of device-local accounts get |
| 425 // handled via the kAccountsPrefDeviceLocalAccounts device setting observer. | 424 // handled via the kAccountsPrefDeviceLocalAccounts device setting observer. |
| 426 } | 425 } |
| 427 | 426 |
| 428 bool ChromeUserManager::CanCurrentUserLock() const { | 427 bool ChromeUserManager::CanCurrentUserLock() const { |
| 429 return UserManagerBase::CanCurrentUserLock() && | 428 return UserManagerBase::CanCurrentUserLock() && |
| 430 GetCurrentUserFlow()->CanLockScreen(); | 429 GetCurrentUserFlow()->CanLockScreen(); |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1) | 1006 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1) |
| 1008 ash::MultiProfileUMA::RecordUserCount(users); | 1007 ash::MultiProfileUMA::RecordUserCount(users); |
| 1009 } | 1008 } |
| 1010 | 1009 |
| 1011 base::debug::SetCrashKeyValue( | 1010 base::debug::SetCrashKeyValue( |
| 1012 crash_keys::kNumberOfUsers, | 1011 crash_keys::kNumberOfUsers, |
| 1013 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); | 1012 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); |
| 1014 } | 1013 } |
| 1015 | 1014 |
| 1016 } // namespace chromeos | 1015 } // namespace chromeos |
| OLD | NEW |