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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager.cc

Issue 427053002: Do not reload account picker when device-local account policy changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Moved policy code to Chrome-specific subclass. Created 6 years, 4 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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698