| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 &show_users_on_signin); | 224 &show_users_on_signin); |
| 225 for (user_manager::UserList::const_iterator it = users.begin(); | 225 for (user_manager::UserList::const_iterator it = users.begin(); |
| 226 it != users.end(); | 226 it != users.end(); |
| 227 ++it) { | 227 ++it) { |
| 228 // TODO(xiyuan): Clean user profile whose email is not in whitelist. | 228 // TODO(xiyuan): Clean user profile whose email is not in whitelist. |
| 229 bool meets_supervised_requirements = | 229 bool meets_supervised_requirements = |
| 230 (*it)->GetType() != user_manager::USER_TYPE_SUPERVISED || | 230 (*it)->GetType() != user_manager::USER_TYPE_SUPERVISED || |
| 231 user_manager::UserManager::Get()->AreSupervisedUsersAllowed(); | 231 user_manager::UserManager::Get()->AreSupervisedUsersAllowed(); |
| 232 bool meets_whitelist_requirements = | 232 bool meets_whitelist_requirements = |
| 233 LoginUtils::IsWhitelisted((*it)->email(), NULL) || | 233 LoginUtils::IsWhitelisted((*it)->email(), NULL) || |
| 234 (*it)->GetType() != user_manager::USER_TYPE_REGULAR; | 234 !(*it)->HasGaiaAccount(); |
| 235 | 235 |
| 236 // Public session accounts are always shown on login screen. | 236 // Public session accounts are always shown on login screen. |
| 237 bool meets_show_users_requirements = | 237 bool meets_show_users_requirements = |
| 238 show_users_on_signin || | 238 show_users_on_signin || |
| 239 (*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; | 239 (*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; |
| 240 if (meets_supervised_requirements && | 240 if (meets_supervised_requirements && |
| 241 meets_whitelist_requirements && | 241 meets_whitelist_requirements && |
| 242 meets_show_users_requirements) { | 242 meets_show_users_requirements) { |
| 243 filtered_users.push_back(*it); | 243 filtered_users.push_back(*it); |
| 244 } | 244 } |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 is_login_in_progress_ = false; | 1214 is_login_in_progress_ = false; |
| 1215 | 1215 |
| 1216 // Reenable clicking on other windows and status area. | 1216 // Reenable clicking on other windows and status area. |
| 1217 login_display_->SetUIEnabled(true); | 1217 login_display_->SetUIEnabled(true); |
| 1218 | 1218 |
| 1219 if (start_public_session_timer) | 1219 if (start_public_session_timer) |
| 1220 StartPublicSessionAutoLoginTimer(); | 1220 StartPublicSessionAutoLoginTimer(); |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 } // namespace chromeos | 1223 } // namespace chromeos |
| OLD | NEW |