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

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

Issue 11419184: Add public accounts to UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made comment easier to understand. 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) {
194 filtered_users.push_back(*it); 195 filtered_users.push_back(*it);
196 }
195 } 197 }
196 } 198 }
197 199
198 // If no user pods are visible, fallback to single new user pod which will 200 // If no user pods are visible, fallback to single new user pod which will
199 // have guest session link. 201 // have guest session link.
200 bool show_guest; 202 bool show_guest;
201 cros_settings_->GetBoolean(kAccountsPrefAllowGuest, &show_guest); 203 cros_settings_->GetBoolean(kAccountsPrefAllowGuest, &show_guest);
202 bool show_users; 204 bool show_users;
203 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_users); 205 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_users);
204 show_guest &= !filtered_users.empty(); 206 show_guest &= !filtered_users.empty();
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 // Invalidate OAuth token, since it can't be correct after password is 964 // Invalidate OAuth token, since it can't be correct after password is
963 // changed. 965 // changed.
964 UserManager::Get()->SaveUserOAuthStatus(username, 966 UserManager::Get()->SaveUserOAuthStatus(username,
965 User::OAUTH_TOKEN_STATUS_INVALID); 967 User::OAUTH_TOKEN_STATUS_INVALID);
966 968
967 login_display_->SetUIEnabled(true); 969 login_display_->SetUIEnabled(true);
968 login_display_->ShowGaiaPasswordChanged(username); 970 login_display_->ShowGaiaPasswordChanged(username);
969 } 971 }
970 972
971 } // namespace chromeos 973 } // 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