| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 400 |
| 401 // Only one instance of LoginPerformer should exist at a time. | 401 // Only one instance of LoginPerformer should exist at a time. |
| 402 login_performer_.reset(NULL); | 402 login_performer_.reset(NULL); |
| 403 login_performer_.reset(new LoginPerformer(this)); | 403 login_performer_.reset(new LoginPerformer(this)); |
| 404 is_login_in_progress_ = true; | 404 is_login_in_progress_ = true; |
| 405 login_performer_->LoginDemoUser(); | 405 login_performer_->LoginDemoUser(); |
| 406 accessibility::MaybeSpeak( | 406 accessibility::MaybeSpeak( |
| 407 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_LOGIN_SIGNIN_DEMOUSER)); | 407 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_LOGIN_SIGNIN_DEMOUSER)); |
| 408 } | 408 } |
| 409 | 409 |
| 410 | |
| 411 | |
| 412 void ExistingUserController::LoginAsGuest() { | 410 void ExistingUserController::LoginAsGuest() { |
| 413 // Disable clicking on other windows. | 411 // Disable clicking on other windows. |
| 414 login_display_->SetUIEnabled(false); | 412 login_display_->SetUIEnabled(false); |
| 415 | 413 |
| 416 // Check allow_guest in case this call is fired from key accelerator. | 414 // Check allow_guest in case this call is fired from key accelerator. |
| 417 // Must not proceed without signature verification. | 415 // Must not proceed without signature verification. |
| 418 if (!cros_settings_->PrepareTrustedValues( | 416 if (!cros_settings_->PrepareTrustedValues( |
| 419 base::Bind(&ExistingUserController::LoginAsGuest, | 417 base::Bind(&ExistingUserController::LoginAsGuest, |
| 420 weak_factory_.GetWeakPtr()))) { | 418 weak_factory_.GetWeakPtr()))) { |
| 421 // Value of AllowGuest setting is still not verified. | 419 // Value of AllowGuest setting is still not verified. |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 // Invalidate OAuth token, since it can't be correct after password is | 863 // Invalidate OAuth token, since it can't be correct after password is |
| 866 // changed. | 864 // changed. |
| 867 UserManager::Get()->SaveUserOAuthStatus(username, | 865 UserManager::Get()->SaveUserOAuthStatus(username, |
| 868 User::OAUTH_TOKEN_STATUS_INVALID); | 866 User::OAUTH_TOKEN_STATUS_INVALID); |
| 869 | 867 |
| 870 login_display_->SetUIEnabled(true); | 868 login_display_->SetUIEnabled(true); |
| 871 login_display_->ShowGaiaPasswordChanged(username); | 869 login_display_->ShowGaiaPasswordChanged(username); |
| 872 } | 870 } |
| 873 | 871 |
| 874 } // namespace chromeos | 872 } // namespace chromeos |
| OLD | NEW |