| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login_performer.h" | 5 #include "chrome/browser/chromeos/login/login_performer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 269 } |
| 270 } | 270 } |
| 271 | 271 |
| 272 bool allow_new_user = false; | 272 bool allow_new_user = false; |
| 273 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 273 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 274 if (ScreenLocker::default_screen_locker() || allow_new_user) { | 274 if (ScreenLocker::default_screen_locker() || allow_new_user) { |
| 275 // Starts authentication if guest login is allowed or online auth pending. | 275 // Starts authentication if guest login is allowed or online auth pending. |
| 276 StartLoginCompletion(); | 276 StartLoginCompletion(); |
| 277 } else { | 277 } else { |
| 278 // Otherwise, do whitelist check first. | 278 // Otherwise, do whitelist check first. |
| 279 if (cros_settings->FindEmailInList(kAccountsPrefUsers, username)) { | 279 if (cros_settings->FindEmailInList( |
| 280 kAccountsPrefUsers, Authenticator::Canonicalize(username))) { |
| 280 StartLoginCompletion(); | 281 StartLoginCompletion(); |
| 281 } else { | 282 } else { |
| 282 if (delegate_) | 283 if (delegate_) |
| 283 delegate_->WhiteListCheckFailed(username); | 284 delegate_->WhiteListCheckFailed(username); |
| 284 else | 285 else |
| 285 NOTREACHED(); | 286 NOTREACHED(); |
| 286 } | 287 } |
| 287 } | 288 } |
| 288 } | 289 } |
| 289 | 290 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 profile, | 546 profile, |
| 546 username_, | 547 username_, |
| 547 password_, | 548 password_, |
| 548 captcha_token_, | 549 captcha_token_, |
| 549 captcha_)); | 550 captcha_)); |
| 550 } | 551 } |
| 551 password_.clear(); | 552 password_.clear(); |
| 552 } | 553 } |
| 553 | 554 |
| 554 } // namespace chromeos | 555 } // namespace chromeos |
| OLD | NEW |