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

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

Issue 4134013: [cros] Possible fix for crash - check whether LoginPerformer instance needs to be recreated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 10 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <map> 9 #include <map>
10 10
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 } else { 553 } else {
554 // Postpone CompleteOffTheRecordLogin until registration completion. 554 // Postpone CompleteOffTheRecordLogin until registration completion.
555 ActivateWizard(WizardController::kRegistrationScreenName); 555 ActivateWizard(WizardController::kRegistrationScreenName);
556 } 556 }
557 } 557 }
558 558
559 void ExistingUserController::OnPasswordChangeDetected( 559 void ExistingUserController::OnPasswordChangeDetected(
560 const GaiaAuthConsumer::ClientLoginResult& credentials) { 560 const GaiaAuthConsumer::ClientLoginResult& credentials) {
561 // When signing in as a "New user" always remove old cryptohome. 561 // When signing in as a "New user" always remove old cryptohome.
562 if (selected_view_index_ == controllers_.size() - 1) { 562 if (selected_view_index_ == controllers_.size() - 1) {
563 login_performer_->ResyncEncryptedData(); 563 ResyncEncryptedData();
564 return; 564 return;
565 } 565 }
566 566
567 // Must not proceed without signature verification. 567 // Must not proceed without signature verification.
568 bool trusted_setting_available = user_settings_->RequestTrustedOwner( 568 bool trusted_setting_available = user_settings_->RequestTrustedOwner(
569 method_factory_.NewRunnableMethod( 569 method_factory_.NewRunnableMethod(
570 &ExistingUserController::OnPasswordChangeDetected, 570 &ExistingUserController::OnPasswordChangeDetected,
571 credentials)); 571 credentials));
572 if (!trusted_setting_available) { 572 if (!trusted_setting_available) {
573 // Value of owner email is still not verified. 573 // Value of owner email is still not verified.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 break; 611 break;
612 } 612 }
613 } 613 }
614 614
615 void ExistingUserController::OnCaptchaEntered(const std::string& captcha) { 615 void ExistingUserController::OnCaptchaEntered(const std::string& captcha) {
616 login_performer_->set_captcha(captcha); 616 login_performer_->set_captcha(captcha);
617 } 617 }
618 618
619 void ExistingUserController::RecoverEncryptedData( 619 void ExistingUserController::RecoverEncryptedData(
620 const std::string& old_password) { 620 const std::string& old_password) {
621 login_performer_->RecoverEncryptedData(old_password); 621 // LoginPerformer instance has state of the user so it should exist.
622 if (login_performer_.get())
623 login_performer_->RecoverEncryptedData(old_password);
622 } 624 }
623 625
624 void ExistingUserController::ResyncEncryptedData() { 626 void ExistingUserController::ResyncEncryptedData() {
625 login_performer_->ResyncEncryptedData(); 627 // LoginPerformer instance has state of the user so it should exist.
628 if (login_performer_.get())
629 login_performer_->ResyncEncryptedData();
626 } 630 }
627 631
628 } // namespace chromeos 632 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698