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/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 host_ = NULL; | 452 host_ = NULL; |
453 } | 453 } |
454 login_display_->OnFadeOut(); | 454 login_display_->OnFadeOut(); |
455 } | 455 } |
456 | 456 |
457 void ExistingUserController::OnOffTheRecordLoginSuccess() { | 457 void ExistingUserController::OnOffTheRecordLoginSuccess() { |
458 if (WizardController::IsDeviceRegistered()) { | 458 if (WizardController::IsDeviceRegistered()) { |
459 LoginUtils::Get()->CompleteOffTheRecordLogin(guest_mode_url_); | 459 LoginUtils::Get()->CompleteOffTheRecordLogin(guest_mode_url_); |
460 } else { | 460 } else { |
461 // Postpone CompleteOffTheRecordLogin until registration completion. | 461 // Postpone CompleteOffTheRecordLogin until registration completion. |
| 462 // TODO(nkostylev): Kind of hack. We have to instruct UserManager here |
| 463 // that we're actually logged in as Guest user as we'll ask UserManager |
| 464 // later in the code path whether we've signed in as Guest and depending |
| 465 // on that would either show image screen or call CompleteOffTheRecordLogin. |
| 466 UserManager::Get()->GuestUserLoggedIn(); |
462 ActivateWizard(WizardController::kRegistrationScreenName); | 467 ActivateWizard(WizardController::kRegistrationScreenName); |
463 } | 468 } |
464 | 469 |
465 if (login_status_consumer_) | 470 if (login_status_consumer_) |
466 login_status_consumer_->OnOffTheRecordLoginSuccess(); | 471 login_status_consumer_->OnOffTheRecordLoginSuccess(); |
467 } | 472 } |
468 | 473 |
469 void ExistingUserController::OnPasswordChangeDetected( | 474 void ExistingUserController::OnPasswordChangeDetected( |
470 const GaiaAuthConsumer::ClientLoginResult& credentials) { | 475 const GaiaAuthConsumer::ClientLoginResult& credentials) { |
471 // Must not proceed without signature verification. | 476 // Must not proceed without signature verification. |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 cryptohomed->AsyncSetOwnerUser( | 592 cryptohomed->AsyncSetOwnerUser( |
588 UserCrosSettingsProvider::cached_owner(), NULL); | 593 UserCrosSettingsProvider::cached_owner(), NULL); |
589 | 594 |
590 // Do not invoke AsyncDoAutomaticFreeDiskSpaceControl(NULL) here | 595 // Do not invoke AsyncDoAutomaticFreeDiskSpaceControl(NULL) here |
591 // so it does not delay the following mount. Cleanup will be | 596 // so it does not delay the following mount. Cleanup will be |
592 // started in Cryptohomed by timer. | 597 // started in Cryptohomed by timer. |
593 } | 598 } |
594 } | 599 } |
595 | 600 |
596 } // namespace chromeos | 601 } // namespace chromeos |
OLD | NEW |