Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1041)

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 11649055: OAuth2 sign-in flow for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 // correct password/display error message. 679 // correct password/display error message.
680 // Even in case when following online,offline protocol and returning 680 // Even in case when following online,offline protocol and returning
681 // requests_pending = false, let LoginPerformer delete itself. 681 // requests_pending = false, let LoginPerformer delete itself.
682 login_performer_->set_delegate(NULL); 682 login_performer_->set_delegate(NULL);
683 ignore_result(login_performer_.release()); 683 ignore_result(login_performer_.release());
684 684
685 // Will call OnProfilePrepared() in the end. 685 // Will call OnProfilePrepared() in the end.
686 LoginUtils::Get()->PrepareProfile(username, 686 LoginUtils::Get()->PrepareProfile(username,
687 display_email_, 687 display_email_,
688 password, 688 password,
689 pending_requests,
690 using_oauth, 689 using_oauth,
691 has_cookies, 690 has_cookies,
692 this); 691 this);
693 692
694 display_email_.clear(); 693 display_email_.clear();
695 694
696 // Notify LoginDisplay to allow it provide visual feedback to user. 695 // Notify LoginDisplay to allow it provide visual feedback to user.
697 login_display_->OnLoginSuccess(username); 696 login_display_->OnLoginSuccess(username);
698 } 697 }
699 698
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 break; 980 break;
982 } 981 }
983 982
984 login_display_->ShowError(error_id, num_login_attempts_, help_topic_id); 983 login_display_->ShowError(error_id, num_login_attempts_, help_topic_id);
985 } 984 }
986 985
987 void ExistingUserController::ShowGaiaPasswordChanged( 986 void ExistingUserController::ShowGaiaPasswordChanged(
988 const std::string& username) { 987 const std::string& username) {
989 // Invalidate OAuth token, since it can't be correct after password is 988 // Invalidate OAuth token, since it can't be correct after password is
990 // changed. 989 // changed.
991 UserManager::Get()->SaveUserOAuthStatus(username, 990 UserManager::Get()->SaveUserOAuthStatus(
992 User::OAUTH_TOKEN_STATUS_INVALID); 991 username,
992 CommandLine::ForCurrentProcess()->HasSwitch(switches::kForceOAuth1) ?
993 User::OAUTH1_TOKEN_STATUS_INVALID :
994 User::OAUTH2_TOKEN_STATUS_INVALID);
993 995
994 login_display_->SetUIEnabled(true); 996 login_display_->SetUIEnabled(true);
995 login_display_->ShowGaiaPasswordChanged(username); 997 login_display_->ShowGaiaPasswordChanged(username);
996 } 998 }
997 999
998 } // namespace chromeos 1000 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698