OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 CommandLine::ForCurrentProcess()->AppendArg(kGetStartedURL); | 518 CommandLine::ForCurrentProcess()->AppendArg(kGetStartedURL); |
519 #endif // OFFICIAL_BUILD | 519 #endif // OFFICIAL_BUILD |
520 if (credentials.two_factor) { | 520 if (credentials.two_factor) { |
521 // If we have a two factor error and and this is a new user, | 521 // If we have a two factor error and and this is a new user, |
522 // load the personal settings page. | 522 // load the personal settings page. |
523 // TODO(stevenjb): direct the user to a lightweight sync login page. | 523 // TODO(stevenjb): direct the user to a lightweight sync login page. |
524 CommandLine::ForCurrentProcess()->AppendArg(kSettingsSyncLoginUrl); | 524 CommandLine::ForCurrentProcess()->AppendArg(kSettingsSyncLoginUrl); |
525 } | 525 } |
526 // For new user login don't launch browser until we pass image screen. | 526 // For new user login don't launch browser until we pass image screen. |
527 LoginUtils::Get()->EnableBrowserLaunch(false); | 527 LoginUtils::Get()->EnableBrowserLaunch(false); |
528 LoginUtils::Get()->CompleteLogin(username, password, credentials); | 528 LoginUtils::Get()->CompleteLogin(username, |
| 529 password, |
| 530 credentials, |
| 531 pending_requests); |
529 ActivateWizard(WizardController::IsDeviceRegistered() ? | 532 ActivateWizard(WizardController::IsDeviceRegistered() ? |
530 WizardController::kUserImageScreenName : | 533 WizardController::kUserImageScreenName : |
531 WizardController::kRegistrationScreenName); | 534 WizardController::kRegistrationScreenName); |
532 } else { | 535 } else { |
533 // Hide the login windows now. | 536 // Hide the login windows now. |
534 WmIpc::Message message(WM_IPC_MESSAGE_WM_HIDE_LOGIN); | 537 WmIpc::Message message(WM_IPC_MESSAGE_WM_HIDE_LOGIN); |
535 WmIpc::instance()->SendMessage(message); | 538 WmIpc::instance()->SendMessage(message); |
536 | 539 |
537 LoginUtils::Get()->CompleteLogin(username, password, credentials); | 540 LoginUtils::Get()->CompleteLogin(username, |
| 541 password, |
| 542 credentials, |
| 543 pending_requests); |
538 | 544 |
539 // Delay deletion as we're on the stack. | 545 // Delay deletion as we're on the stack. |
540 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 546 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
541 } | 547 } |
542 } | 548 } |
543 | 549 |
544 void ExistingUserController::OnOffTheRecordLoginSuccess() { | 550 void ExistingUserController::OnOffTheRecordLoginSuccess() { |
545 if (WizardController::IsDeviceRegistered()) { | 551 if (WizardController::IsDeviceRegistered()) { |
546 LoginUtils::Get()->CompleteOffTheRecordLogin(start_url_); | 552 LoginUtils::Get()->CompleteOffTheRecordLogin(start_url_); |
547 } else { | 553 } else { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 void ExistingUserController::RecoverEncryptedData( | 619 void ExistingUserController::RecoverEncryptedData( |
614 const std::string& old_password) { | 620 const std::string& old_password) { |
615 login_performer_->RecoverEncryptedData(old_password); | 621 login_performer_->RecoverEncryptedData(old_password); |
616 } | 622 } |
617 | 623 |
618 void ExistingUserController::ResyncEncryptedData() { | 624 void ExistingUserController::ResyncEncryptedData() { |
619 login_performer_->ResyncEncryptedData(); | 625 login_performer_->ResyncEncryptedData(); |
620 } | 626 } |
621 | 627 |
622 } // namespace chromeos | 628 } // namespace chromeos |
OLD | NEW |