OLD | NEW |
---|---|
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 } | 182 } |
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. |
pastarmovj
2012/11/28 09:57:16
Don't you do the clean up from this TODO in UseRMa
bartfab (slow)
2012/11/28 12:30:17
No, I only clean up device-local accounts that no
| |
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 Loading... | |
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 |
OLD | NEW |