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

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

Issue 6350003: [cros] Make "New user" sign in consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 if (WizardController::IsDeviceRegistered()) { 586 if (WizardController::IsDeviceRegistered()) {
587 LoginUtils::Get()->CompleteOffTheRecordLogin(start_url_); 587 LoginUtils::Get()->CompleteOffTheRecordLogin(start_url_);
588 } else { 588 } else {
589 // Postpone CompleteOffTheRecordLogin until registration completion. 589 // Postpone CompleteOffTheRecordLogin until registration completion.
590 ActivateWizard(WizardController::kRegistrationScreenName); 590 ActivateWizard(WizardController::kRegistrationScreenName);
591 } 591 }
592 } 592 }
593 593
594 void ExistingUserController::OnPasswordChangeDetected( 594 void ExistingUserController::OnPasswordChangeDetected(
595 const GaiaAuthConsumer::ClientLoginResult& credentials) { 595 const GaiaAuthConsumer::ClientLoginResult& credentials) {
596 // When signing in as a "New user" always remove old cryptohome.
597 if (selected_view_index_ == controllers_.size() - 1) {
598 ResyncEncryptedData();
599 return;
600 }
601
602 // Must not proceed without signature verification. 596 // Must not proceed without signature verification.
603 bool trusted_setting_available = user_settings_->RequestTrustedOwner( 597 bool trusted_setting_available = user_settings_->RequestTrustedOwner(
604 method_factory_.NewRunnableMethod( 598 method_factory_.NewRunnableMethod(
605 &ExistingUserController::OnPasswordChangeDetected, 599 &ExistingUserController::OnPasswordChangeDetected,
606 credentials)); 600 credentials));
607 if (!trusted_setting_available) { 601 if (!trusted_setting_available) {
608 // Value of owner email is still not verified. 602 // Value of owner email is still not verified.
609 // Another attempt will be invoked after verification completion. 603 // Another attempt will be invoked after verification completion.
610 return; 604 return;
611 } 605 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 login_performer_->RecoverEncryptedData(old_password); 652 login_performer_->RecoverEncryptedData(old_password);
659 } 653 }
660 654
661 void ExistingUserController::ResyncEncryptedData() { 655 void ExistingUserController::ResyncEncryptedData() {
662 // LoginPerformer instance has state of the user so it should exist. 656 // LoginPerformer instance has state of the user so it should exist.
663 if (login_performer_.get()) 657 if (login_performer_.get())
664 login_performer_->ResyncEncryptedData(); 658 login_performer_->ResyncEncryptedData();
665 } 659 }
666 660
667 } // namespace chromeos 661 } // 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