| 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 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 break; | 991 break; |
| 992 } | 992 } |
| 993 | 993 |
| 994 login_display_->ShowError(error_id, num_login_attempts_, help_topic_id); | 994 login_display_->ShowError(error_id, num_login_attempts_, help_topic_id); |
| 995 } | 995 } |
| 996 | 996 |
| 997 void ExistingUserController::ShowGaiaPasswordChanged( | 997 void ExistingUserController::ShowGaiaPasswordChanged( |
| 998 const std::string& username) { | 998 const std::string& username) { |
| 999 // Invalidate OAuth token, since it can't be correct after password is | 999 // Invalidate OAuth token, since it can't be correct after password is |
| 1000 // changed. | 1000 // changed. |
| 1001 UserManager::Get()->SaveUserOAuthStatus(username, | 1001 UserManager::Get()->SaveUserOAuthStatus( |
| 1002 User::OAUTH_TOKEN_STATUS_INVALID); | 1002 username, |
| 1003 CommandLine::ForCurrentProcess()->HasSwitch(switches::kForceOAuth2) ? |
| 1004 User::OAUTH2_TOKEN_STATUS_INVALID : |
| 1005 User::OAUTH1_TOKEN_STATUS_INVALID); |
| 1003 | 1006 |
| 1004 login_display_->SetUIEnabled(true); | 1007 login_display_->SetUIEnabled(true); |
| 1005 login_display_->ShowGaiaPasswordChanged(username); | 1008 login_display_->ShowGaiaPasswordChanged(username); |
| 1006 } | 1009 } |
| 1007 | 1010 |
| 1008 } // namespace chromeos | 1011 } // namespace chromeos |
| OLD | NEW |