| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, | 190 cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, |
| 191 &show_users_on_signin); | 191 &show_users_on_signin); |
| 192 if (show_users_on_signin) { | 192 if (show_users_on_signin) { |
| 193 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { | 193 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { |
| 194 // TODO(xiyuan): Clean user profile whose email is not in whitelist. | 194 // TODO(xiyuan): Clean user profile whose email is not in whitelist. |
| 195 bool meets_locally_managed_requirements = | 195 bool meets_locally_managed_requirements = |
| 196 (*it)->GetType() != User::USER_TYPE_LOCALLY_MANAGED || | 196 (*it)->GetType() != User::USER_TYPE_LOCALLY_MANAGED || |
| 197 UserManager::Get()->AreLocallyManagedUsersAllowed(); | 197 UserManager::Get()->AreLocallyManagedUsersAllowed(); |
| 198 bool meets_whitelist_requirements = | 198 bool meets_whitelist_requirements = |
| 199 LoginUtils::IsWhitelisted((*it)->email()) || | 199 LoginUtils::IsWhitelisted((*it)->email(), NULL) || |
| 200 (*it)->GetType() != User::USER_TYPE_REGULAR; | 200 (*it)->GetType() != User::USER_TYPE_REGULAR; |
| 201 if (meets_locally_managed_requirements && meets_whitelist_requirements) { | 201 if (meets_locally_managed_requirements && meets_whitelist_requirements) { |
| 202 filtered_users.push_back(*it); | 202 filtered_users.push_back(*it); |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 | 206 |
| 207 // If no user pods are visible, fallback to single new user pod which will | 207 // If no user pods are visible, fallback to single new user pod which will |
| 208 // have guest session link. | 208 // have guest session link. |
| 209 bool show_guest; | 209 bool show_guest; |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 void ExistingUserController::SendAccessibilityAlert( | 1110 void ExistingUserController::SendAccessibilityAlert( |
| 1111 const std::string& alert_text) { | 1111 const std::string& alert_text) { |
| 1112 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text); | 1112 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text); |
| 1113 SendControlAccessibilityNotification( | 1113 SendControlAccessibilityNotification( |
| 1114 ui::AccessibilityTypes::EVENT_VALUE_CHANGED, &event); | 1114 ui::AccessibilityTypes::EVENT_VALUE_CHANGED, &event); |
| 1115 } | 1115 } |
| 1116 | 1116 |
| 1117 } // namespace chromeos | 1117 } // namespace chromeos |
| OLD | NEW |