| Index: chromeos/login/auth/cryptohome_authenticator.cc
|
| diff --git a/chromeos/login/auth/cryptohome_authenticator.cc b/chromeos/login/auth/cryptohome_authenticator.cc
|
| index f434dcd4d21e0d8364127c15c7d71f83e5d3bfda..0e4b2c53d18fa78f0df9a9abf2129dde03ebbaf6 100644
|
| --- a/chromeos/login/auth/cryptohome_authenticator.cc
|
| +++ b/chromeos/login/auth/cryptohome_authenticator.cc
|
| @@ -658,6 +658,12 @@ void CryptohomeAuthenticator::OnPasswordChangeDetected() {
|
| consumer_->OnPasswordChangeDetected();
|
| }
|
|
|
| +void CryptohomeAuthenticator::OnOldEncryptionDetected() {
|
| + DCHECK(task_runner_->RunsTasksOnCurrentThread());
|
| + if (consumer_)
|
| + consumer_->OnOldEncryptionDetected();
|
| +}
|
| +
|
| void CryptohomeAuthenticator::OnAuthFailure(const AuthFailure& error) {
|
| DCHECK(task_runner_->RunsTasksOnCurrentThread());
|
|
|
| @@ -856,6 +862,14 @@ void CryptohomeAuthenticator::Resolve() {
|
| AuthFailure(AuthFailure::OWNER_REQUIRED)));
|
| break;
|
| }
|
| + case FAILED_OLD_ENCRYPTION:
|
| + // 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));
|
| + break;
|
| default:
|
| NOTREACHED();
|
| break;
|
| @@ -928,6 +942,11 @@ CryptohomeAuthenticator::ResolveCryptohomeFailureState() {
|
| return FAILED_TPM;
|
| }
|
|
|
| + if (current_state_->cryptohome_code() ==
|
| + cryptohome::MOUNT_ERROR_OLD_ENCRYPTION) {
|
| + return FAILED_OLD_ENCRYPTION;
|
| + }
|
| +
|
| // Return intermediate states in the following case:
|
| // when there is an online result to use;
|
| // This is the case after user finishes Gaia login;
|
|
|