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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, | 221 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, |
222 &show_users_on_signin); | 222 &show_users_on_signin); |
223 for (user_manager::UserList::const_iterator it = users.begin(); | 223 for (user_manager::UserList::const_iterator it = users.begin(); |
224 it != users.end(); | 224 it != users.end(); |
225 ++it) { | 225 ++it) { |
226 // TODO(xiyuan): Clean user profile whose email is not in whitelist. | 226 // TODO(xiyuan): Clean user profile whose email is not in whitelist. |
227 bool meets_supervised_requirements = | 227 bool meets_supervised_requirements = |
228 (*it)->GetType() != user_manager::USER_TYPE_SUPERVISED || | 228 (*it)->GetType() != user_manager::USER_TYPE_SUPERVISED || |
229 user_manager::UserManager::Get()->AreSupervisedUsersAllowed(); | 229 user_manager::UserManager::Get()->AreSupervisedUsersAllowed(); |
230 bool meets_whitelist_requirements = | 230 bool meets_whitelist_requirements = |
231 LoginUtils::IsWhitelisted((*it)->email(), NULL) || | 231 LoginUtils::IsWhitelisted((*it)->email(), NULL) || (*it)->IsRegular(); |
Nikita (slow)
2014/11/11 12:06:36
This has to be !(*it)->IsRegular()
merkulova
2014/11/11 15:47:43
Done.
| |
232 (*it)->GetType() != user_manager::USER_TYPE_REGULAR; | |
233 | 232 |
234 // Public session accounts are always shown on login screen. | 233 // Public session accounts are always shown on login screen. |
235 bool meets_show_users_requirements = | 234 bool meets_show_users_requirements = |
236 show_users_on_signin || | 235 show_users_on_signin || |
237 (*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; | 236 (*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; |
238 if (meets_supervised_requirements && | 237 if (meets_supervised_requirements && |
239 meets_whitelist_requirements && | 238 meets_whitelist_requirements && |
240 meets_show_users_requirements) { | 239 meets_show_users_requirements) { |
241 filtered_users.push_back(*it); | 240 filtered_users.push_back(*it); |
242 } | 241 } |
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1190 is_login_in_progress_ = false; | 1189 is_login_in_progress_ = false; |
1191 | 1190 |
1192 // Reenable clicking on other windows and status area. | 1191 // Reenable clicking on other windows and status area. |
1193 login_display_->SetUIEnabled(true); | 1192 login_display_->SetUIEnabled(true); |
1194 | 1193 |
1195 if (start_public_session_timer) | 1194 if (start_public_session_timer) |
1196 StartPublicSessionAutoLoginTimer(); | 1195 StartPublicSessionAutoLoginTimer(); |
1197 } | 1196 } |
1198 | 1197 |
1199 } // namespace chromeos | 1198 } // namespace chromeos |
OLD | NEW |