| 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/user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/user_manager_impl.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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 scoped_ptr<std::string> data) { | 1017 scoped_ptr<std::string> data) { |
| 1018 if (policy == policy::key::kUserAvatarImage) | 1018 if (policy == policy::key::kUserAvatarImage) |
| 1019 GetUserImageManager(user_id)->OnExternalDataFetched(policy, data.Pass()); | 1019 GetUserImageManager(user_id)->OnExternalDataFetched(policy, data.Pass()); |
| 1020 else if (policy == policy::key::kWallpaperImage) | 1020 else if (policy == policy::key::kWallpaperImage) |
| 1021 WallpaperManager::Get()->OnPolicyFetched(policy, user_id, data.Pass()); | 1021 WallpaperManager::Get()->OnPolicyFetched(policy, user_id, data.Pass()); |
| 1022 else | 1022 else |
| 1023 NOTREACHED(); | 1023 NOTREACHED(); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 void UserManagerImpl::OnPolicyUpdated(const std::string& user_id) { | 1026 void UserManagerImpl::OnPolicyUpdated(const std::string& user_id) { |
| 1027 const User* user = FindUserInList(user_id); |
| 1028 if (!user || user->GetType() != User::USER_TYPE_PUBLIC_ACCOUNT) |
| 1029 return; |
| 1027 UpdatePublicAccountDisplayName(user_id); | 1030 UpdatePublicAccountDisplayName(user_id); |
| 1028 NotifyUserListChanged(); | 1031 NotifyUserListChanged(); |
| 1029 } | 1032 } |
| 1030 | 1033 |
| 1031 void UserManagerImpl::OnDeviceLocalAccountsChanged() { | 1034 void UserManagerImpl::OnDeviceLocalAccountsChanged() { |
| 1032 // No action needed here, changes to the list of device-local accounts get | 1035 // No action needed here, changes to the list of device-local accounts get |
| 1033 // handled via the kAccountsPrefDeviceLocalAccounts device setting observer. | 1036 // handled via the kAccountsPrefDeviceLocalAccounts device setting observer. |
| 1034 } | 1037 } |
| 1035 | 1038 |
| 1036 bool UserManagerImpl::IsCurrentUserOwner() const { | 1039 bool UserManagerImpl::IsCurrentUserOwner() const { |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2104 } | 2107 } |
| 2105 | 2108 |
| 2106 void UserManagerImpl::DeleteUser(User* user) { | 2109 void UserManagerImpl::DeleteUser(User* user) { |
| 2107 const bool is_active_user = (user == active_user_); | 2110 const bool is_active_user = (user == active_user_); |
| 2108 delete user; | 2111 delete user; |
| 2109 if (is_active_user) | 2112 if (is_active_user) |
| 2110 active_user_ = NULL; | 2113 active_user_ = NULL; |
| 2111 } | 2114 } |
| 2112 | 2115 |
| 2113 } // namespace chromeos | 2116 } // namespace chromeos |
| OLD | NEW |