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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 11299284: Revert 170507 - Add public accounts to UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 void ExistingUserController::UpdateLoginDisplay(const UserList& users) { 184 void ExistingUserController::UpdateLoginDisplay(const UserList& users) {
185 bool show_users_on_signin; 185 bool show_users_on_signin;
186 UserList filtered_users; 186 UserList filtered_users;
187 187
188 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, 188 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn,
189 &show_users_on_signin); 189 &show_users_on_signin);
190 if (show_users_on_signin) { 190 if (show_users_on_signin) {
191 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { 191 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
192 // TODO(xiyuan): Clean user profile whose email is not in whitelist. 192 // TODO(xiyuan): Clean user profile whose email is not in whitelist.
193 if (LoginUtils::IsWhitelisted((*it)->email()) || 193 if (LoginUtils::IsWhitelisted((*it)->email()))
194 (*it)->GetType() != User::USER_TYPE_REGULAR) {
195 filtered_users.push_back(*it); 194 filtered_users.push_back(*it);
196 }
197 } 195 }
198 } 196 }
199 197
200 // If no user pods are visible, fallback to single new user pod which will 198 // If no user pods are visible, fallback to single new user pod which will
201 // have guest session link. 199 // have guest session link.
202 bool show_guest; 200 bool show_guest;
203 cros_settings_->GetBoolean(kAccountsPrefAllowGuest, &show_guest); 201 cros_settings_->GetBoolean(kAccountsPrefAllowGuest, &show_guest);
204 bool show_users; 202 bool show_users;
205 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_users); 203 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_users);
206 show_guest &= !filtered_users.empty(); 204 show_guest &= !filtered_users.empty();
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 // Invalidate OAuth token, since it can't be correct after password is 962 // Invalidate OAuth token, since it can't be correct after password is
965 // changed. 963 // changed.
966 UserManager::Get()->SaveUserOAuthStatus(username, 964 UserManager::Get()->SaveUserOAuthStatus(username,
967 User::OAUTH_TOKEN_STATUS_INVALID); 965 User::OAUTH_TOKEN_STATUS_INVALID);
968 966
969 login_display_->SetUIEnabled(true); 967 login_display_->SetUIEnabled(true);
970 login_display_->ShowGaiaPasswordChanged(username); 968 login_display_->ShowGaiaPasswordChanged(username);
971 } 969 }
972 970
973 } // namespace chromeos 971 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/login/mock_user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698