OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromeos/login/auth/cryptohome_authenticator.h" | 5 #include "chromeos/login/auth/cryptohome_authenticator.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 | 654 |
655 void CryptohomeAuthenticator::OnPasswordChangeDetected() { | 655 void CryptohomeAuthenticator::OnPasswordChangeDetected() { |
656 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 656 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
657 if (consumer_) | 657 if (consumer_) |
658 consumer_->OnPasswordChangeDetected(); | 658 consumer_->OnPasswordChangeDetected(); |
659 } | 659 } |
660 | 660 |
661 void CryptohomeAuthenticator::OnOldEncryptionDetected() { | 661 void CryptohomeAuthenticator::OnOldEncryptionDetected() { |
662 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 662 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
663 if (consumer_) | 663 if (consumer_) |
664 consumer_->OnOldEncryptionDetected(); | 664 consumer_->OnOldEncryptionDetected(current_state_->user_context); |
665 } | 665 } |
666 | 666 |
667 void CryptohomeAuthenticator::OnAuthFailure(const AuthFailure& error) { | 667 void CryptohomeAuthenticator::OnAuthFailure(const AuthFailure& error) { |
668 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 668 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
669 | 669 |
670 // OnAuthFailure will be called again with the same |error| | 670 // OnAuthFailure will be called again with the same |error| |
671 // after the cryptohome has been removed. | 671 // after the cryptohome has been removed. |
672 if (remove_user_data_on_failure_) { | 672 if (remove_user_data_on_failure_) { |
673 delayed_login_failure_ = &error; | 673 delayed_login_failure_ = &error; |
674 RemoveEncryptedData(); | 674 RemoveEncryptedData(); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 Resolve(); | 1023 Resolve(); |
1024 } | 1024 } |
1025 | 1025 |
1026 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, | 1026 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, |
1027 bool check_result) { | 1027 bool check_result) { |
1028 owner_is_verified_ = owner_check_finished; | 1028 owner_is_verified_ = owner_check_finished; |
1029 user_can_login_ = check_result; | 1029 user_can_login_ = check_result; |
1030 } | 1030 } |
1031 | 1031 |
1032 } // namespace chromeos | 1032 } // namespace chromeos |
OLD | NEW |