| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 | 376 |
| 377 // Only one instance of LoginPerformer should exist at a time. | 377 // Only one instance of LoginPerformer should exist at a time. |
| 378 login_performer_.reset(NULL); | 378 login_performer_.reset(NULL); |
| 379 login_performer_.reset(new LoginPerformer(this)); | 379 login_performer_.reset(new LoginPerformer(this)); |
| 380 is_login_in_progress_ = true; | 380 is_login_in_progress_ = true; |
| 381 login_performer_->LoginDemoUser(); | 381 login_performer_->LoginDemoUser(); |
| 382 accessibility::MaybeSpeak( | 382 accessibility::MaybeSpeak( |
| 383 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_LOGIN_SIGNIN_DEMOUSER)); | 383 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_LOGIN_SIGNIN_DEMOUSER)); |
| 384 } | 384 } |
| 385 | 385 |
| 386 | |
| 387 | |
| 388 void ExistingUserController::LoginAsGuest() { | 386 void ExistingUserController::LoginAsGuest() { |
| 389 // Disable clicking on other windows. | 387 // Disable clicking on other windows. |
| 390 login_display_->SetUIEnabled(false); | 388 login_display_->SetUIEnabled(false); |
| 391 | 389 |
| 392 // Check allow_guest in case this call is fired from key accelerator. | 390 // Check allow_guest in case this call is fired from key accelerator. |
| 393 // Must not proceed without signature verification. | 391 // Must not proceed without signature verification. |
| 394 if (!cros_settings_->PrepareTrustedValues( | 392 if (!cros_settings_->PrepareTrustedValues( |
| 395 base::Bind(&ExistingUserController::LoginAsGuest, | 393 base::Bind(&ExistingUserController::LoginAsGuest, |
| 396 weak_factory_.GetWeakPtr()))) { | 394 weak_factory_.GetWeakPtr()))) { |
| 397 // Value of AllowGuest setting is still not verified. | 395 // Value of AllowGuest setting is still not verified. |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 // Invalidate OAuth token, since it can't be correct after password is | 775 // Invalidate OAuth token, since it can't be correct after password is |
| 778 // changed. | 776 // changed. |
| 779 UserManager::Get()->SaveUserOAuthStatus(username, | 777 UserManager::Get()->SaveUserOAuthStatus(username, |
| 780 User::OAUTH_TOKEN_STATUS_INVALID); | 778 User::OAUTH_TOKEN_STATUS_INVALID); |
| 781 | 779 |
| 782 login_display_->SetUIEnabled(true); | 780 login_display_->SetUIEnabled(true); |
| 783 login_display_->ShowGaiaPasswordChanged(username); | 781 login_display_->ShowGaiaPasswordChanged(username); |
| 784 } | 782 } |
| 785 | 783 |
| 786 } // namespace chromeos | 784 } // namespace chromeos |
| OLD | NEW |