Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: trunk/src/chrome/browser/chromeos/login/users/user_manager_impl.cc

Issue 319273002: Revert 275550 "Revert 275046 "ChromeOS login webui refactoring: ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 scoped_ptr<std::string> data) { 1012 scoped_ptr<std::string> data) {
1013 if (policy == policy::key::kUserAvatarImage) 1013 if (policy == policy::key::kUserAvatarImage)
1014 GetUserImageManager(user_id)->OnExternalDataFetched(policy, data.Pass()); 1014 GetUserImageManager(user_id)->OnExternalDataFetched(policy, data.Pass());
1015 else if (policy == policy::key::kWallpaperImage) 1015 else if (policy == policy::key::kWallpaperImage)
1016 WallpaperManager::Get()->OnPolicyFetched(policy, user_id, data.Pass()); 1016 WallpaperManager::Get()->OnPolicyFetched(policy, user_id, data.Pass());
1017 else 1017 else
1018 NOTREACHED(); 1018 NOTREACHED();
1019 } 1019 }
1020 1020
1021 void UserManagerImpl::OnPolicyUpdated(const std::string& user_id) { 1021 void UserManagerImpl::OnPolicyUpdated(const std::string& user_id) {
1022 const User* user = FindUserInList(user_id);
1023 if (!user || user->GetType() != User::USER_TYPE_PUBLIC_ACCOUNT)
1024 return;
1022 UpdatePublicAccountDisplayName(user_id); 1025 UpdatePublicAccountDisplayName(user_id);
1023 NotifyUserListChanged(); 1026 NotifyUserListChanged();
1024 } 1027 }
1025 1028
1026 void UserManagerImpl::OnDeviceLocalAccountsChanged() { 1029 void UserManagerImpl::OnDeviceLocalAccountsChanged() {
1027 // No action needed here, changes to the list of device-local accounts get 1030 // No action needed here, changes to the list of device-local accounts get
1028 // handled via the kAccountsPrefDeviceLocalAccounts device setting observer. 1031 // handled via the kAccountsPrefDeviceLocalAccounts device setting observer.
1029 } 1032 }
1030 1033
1031 bool UserManagerImpl::IsCurrentUserOwner() const { 1034 bool UserManagerImpl::IsCurrentUserOwner() const {
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 } 2100 }
2098 2101
2099 void UserManagerImpl::DeleteUser(User* user) { 2102 void UserManagerImpl::DeleteUser(User* user) {
2100 const bool is_active_user = (user == active_user_); 2103 const bool is_active_user = (user == active_user_);
2101 delete user; 2104 delete user;
2102 if (is_active_user) 2105 if (is_active_user)
2103 active_user_ = NULL; 2106 active_user_ = NULL;
2104 } 2107 }
2105 2108
2106 } // namespace chromeos 2109 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698