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

Unified Diff: chromeos/login/auth/cryptohome_authenticator.cc

Issue 2779933002: Add a screen to migrate filesystem encryption from eCryptfs to ext4 crypto. (Closed)
Patch Set: Address review comments. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/login/auth/cryptohome_authenticator.h ('k') | chromeos/login/auth/login_performer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chromeos/login/auth/cryptohome_authenticator.h ('k') | chromeos/login/auth/login_performer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698