| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 &show_users_on_signin); | 233 &show_users_on_signin); |
| 234 for (user_manager::UserList::const_iterator it = users.begin(); | 234 for (user_manager::UserList::const_iterator it = users.begin(); |
| 235 it != users.end(); | 235 it != users.end(); |
| 236 ++it) { | 236 ++it) { |
| 237 // TODO(xiyuan): Clean user profile whose email is not in whitelist. | 237 // TODO(xiyuan): Clean user profile whose email is not in whitelist. |
| 238 bool meets_supervised_requirements = | 238 bool meets_supervised_requirements = |
| 239 (*it)->GetType() != user_manager::USER_TYPE_SUPERVISED || | 239 (*it)->GetType() != user_manager::USER_TYPE_SUPERVISED || |
| 240 user_manager::UserManager::Get()->AreSupervisedUsersAllowed(); | 240 user_manager::UserManager::Get()->AreSupervisedUsersAllowed(); |
| 241 bool meets_whitelist_requirements = | 241 bool meets_whitelist_requirements = |
| 242 LoginUtils::IsWhitelisted((*it)->email(), NULL) || | 242 LoginUtils::IsWhitelisted((*it)->email(), NULL) || |
| 243 (*it)->GetType() != user_manager::USER_TYPE_REGULAR; | 243 !(*it)->HasGaiaAccount(); |
| 244 | 244 |
| 245 // Public session accounts are always shown on login screen. | 245 // Public session accounts are always shown on login screen. |
| 246 bool meets_show_users_requirements = | 246 bool meets_show_users_requirements = |
| 247 show_users_on_signin || | 247 show_users_on_signin || |
| 248 (*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; | 248 (*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; |
| 249 if (meets_supervised_requirements && | 249 if (meets_supervised_requirements && |
| 250 meets_whitelist_requirements && | 250 meets_whitelist_requirements && |
| 251 meets_show_users_requirements) { | 251 meets_show_users_requirements) { |
| 252 filtered_users.push_back(*it); | 252 filtered_users.push_back(*it); |
| 253 } | 253 } |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 is_login_in_progress_ = false; | 1234 is_login_in_progress_ = false; |
| 1235 | 1235 |
| 1236 // Reenable clicking on other windows and status area. | 1236 // Reenable clicking on other windows and status area. |
| 1237 login_display_->SetUIEnabled(true); | 1237 login_display_->SetUIEnabled(true); |
| 1238 | 1238 |
| 1239 if (start_public_session_timer) | 1239 if (start_public_session_timer) |
| 1240 StartPublicSessionAutoLoginTimer(); | 1240 StartPublicSessionAutoLoginTimer(); |
| 1241 } | 1241 } |
| 1242 | 1242 |
| 1243 } // namespace chromeos | 1243 } // namespace chromeos |
| OLD | NEW |