| Index: chromeos/login/auth/cryptohome_authenticator.cc
|
| diff --git a/chromeos/login/auth/cryptohome_authenticator.cc b/chromeos/login/auth/cryptohome_authenticator.cc
|
| index a301fccce6f4a405e914079f2cd0530f6d77b77c..a4f98d23be13501898b09f071522baf656f68650 100644
|
| --- a/chromeos/login/auth/cryptohome_authenticator.cc
|
| +++ b/chromeos/login/auth/cryptohome_authenticator.cc
|
| @@ -660,10 +660,13 @@ void CryptohomeAuthenticator::OnPasswordChangeDetected() {
|
| consumer_->OnPasswordChangeDetected();
|
| }
|
|
|
| -void CryptohomeAuthenticator::OnOldEncryptionDetected() {
|
| +void CryptohomeAuthenticator::OnOldEncryptionDetected(
|
| + bool has_incomplete_migration) {
|
| DCHECK(task_runner_->RunsTasksOnCurrentThread());
|
| - if (consumer_)
|
| - consumer_->OnOldEncryptionDetected(current_state_->user_context);
|
| + if (consumer_) {
|
| + consumer_->OnOldEncryptionDetected(current_state_->user_context,
|
| + has_incomplete_migration);
|
| + }
|
| }
|
|
|
| void CryptohomeAuthenticator::OnAuthFailure(const AuthFailure& error) {
|
| @@ -865,12 +868,14 @@ void CryptohomeAuthenticator::Resolve() {
|
| break;
|
| }
|
| case FAILED_OLD_ENCRYPTION:
|
| + case FAILED_PREVIOUS_MIGRATION_INCOMPLETE:
|
| // In this case, we tried to create/mount cryptohome and failed
|
| // because the file system is encrypted in old format.
|
| // Chrome will show a screen which asks user to migrate the encryption.
|
| task_runner_->PostTask(
|
| FROM_HERE,
|
| - base::Bind(&CryptohomeAuthenticator::OnOldEncryptionDetected, this));
|
| + base::Bind(&CryptohomeAuthenticator::OnOldEncryptionDetected, this,
|
| + state == FAILED_PREVIOUS_MIGRATION_INCOMPLETE));
|
| break;
|
| default:
|
| NOTREACHED();
|
| @@ -948,6 +953,10 @@ CryptohomeAuthenticator::ResolveCryptohomeFailureState() {
|
| cryptohome::MOUNT_ERROR_OLD_ENCRYPTION) {
|
| return FAILED_OLD_ENCRYPTION;
|
| }
|
| + if (current_state_->cryptohome_code() ==
|
| + cryptohome::MOUNT_ERROR_PREVIOUS_MIGRATION_INCOMPLETE) {
|
| + return FAILED_PREVIOUS_MIGRATION_INCOMPLETE;
|
| + }
|
|
|
| // Return intermediate states in the following case:
|
| // when there is an online result to use;
|
|
|