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

Side by Side Diff: chromeos/login/auth/cryptohome_authenticator.h

Issue 2779933002: Add a screen to migrate filesystem encryption from eCryptfs to ext4 crypto. (Closed)
Patch Set: Address review comments. Created 3 years, 8 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
OLDNEW
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 #ifndef CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_ 5 #ifndef CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_
6 #define CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_ 6 #define CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // but offline succeeded. 82 // but offline succeeded.
83 GUEST_LOGIN = 16, // Logged in guest mode. 83 GUEST_LOGIN = 16, // Logged in guest mode.
84 PUBLIC_ACCOUNT_LOGIN = 17, // Logged into a public account. 84 PUBLIC_ACCOUNT_LOGIN = 17, // Logged into a public account.
85 SUPERVISED_USER_LOGIN = 18, // Logged in as a supervised user. 85 SUPERVISED_USER_LOGIN = 18, // Logged in as a supervised user.
86 LOGIN_FAILED = 19, // Login denied. 86 LOGIN_FAILED = 19, // Login denied.
87 OWNER_REQUIRED = 20, // Login is restricted to the owner only. 87 OWNER_REQUIRED = 20, // Login is restricted to the owner only.
88 FAILED_USERNAME_HASH = 21, // Failed GetSanitizedUsername request. 88 FAILED_USERNAME_HASH = 21, // Failed GetSanitizedUsername request.
89 KIOSK_ACCOUNT_LOGIN = 22, // Logged into a kiosk account. 89 KIOSK_ACCOUNT_LOGIN = 22, // Logged into a kiosk account.
90 REMOVED_DATA_AFTER_FAILURE = 23, // Successfully removed the user's 90 REMOVED_DATA_AFTER_FAILURE = 23, // Successfully removed the user's
91 // cryptohome after a login failure. 91 // cryptohome after a login failure.
92 FAILED_OLD_ENCRYPTION = 24, // Login failed, cryptohome is encrypted
93 // in old format.
92 }; 94 };
93 95
94 CryptohomeAuthenticator(scoped_refptr<base::TaskRunner> task_runner, 96 CryptohomeAuthenticator(scoped_refptr<base::TaskRunner> task_runner,
95 AuthStatusConsumer* consumer); 97 AuthStatusConsumer* consumer);
96 98
97 // Authenticator overrides. 99 // Authenticator overrides.
98 void CompleteLogin(content::BrowserContext* context, 100 void CompleteLogin(content::BrowserContext* context,
99 const UserContext& user_context) override; 101 const UserContext& user_context) override;
100 102
101 // Given |user_context|, this method attempts to authenticate to your 103 // Given |user_context|, this method attempts to authenticate to your
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Attempts to make a decision and call back |consumer_| based on 157 // Attempts to make a decision and call back |consumer_| based on
156 // the state we have gathered at the time of call. If a decision 158 // the state we have gathered at the time of call. If a decision
157 // can't be made, defers until the next time this is called. 159 // can't be made, defers until the next time this is called.
158 // When a decision is made, will call back to |consumer_| on the UI thread. 160 // When a decision is made, will call back to |consumer_| on the UI thread.
159 // 161 //
160 // Must be called on the UI thread. 162 // Must be called on the UI thread.
161 void Resolve() override; 163 void Resolve() override;
162 164
163 void OnOffTheRecordAuthSuccess(); 165 void OnOffTheRecordAuthSuccess();
164 void OnPasswordChangeDetected(); 166 void OnPasswordChangeDetected();
167 void OnOldEncryptionDetected();
165 168
166 protected: 169 protected:
167 ~CryptohomeAuthenticator() override; 170 ~CryptohomeAuthenticator() override;
168 171
169 typedef base::Callback<void(bool is_owner)> IsOwnerCallback; 172 typedef base::Callback<void(bool is_owner)> IsOwnerCallback;
170 173
171 // Method to be implemented in child. Return |true| if user specified in 174 // Method to be implemented in child. Return |true| if user specified in
172 // |context| exists on device. 175 // |context| exists on device.
173 virtual bool IsKnownUser(const UserContext& context) = 0; 176 virtual bool IsKnownUser(const UserContext& context) = 0;
174 177
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // When |remove_user_data_on_failure_| is set, we delay calling 267 // When |remove_user_data_on_failure_| is set, we delay calling
265 // consumer_->OnAuthFailure() until we removed the user cryptohome. 268 // consumer_->OnAuthFailure() until we removed the user cryptohome.
266 const AuthFailure* delayed_login_failure_; 269 const AuthFailure* delayed_login_failure_;
267 270
268 DISALLOW_COPY_AND_ASSIGN(CryptohomeAuthenticator); 271 DISALLOW_COPY_AND_ASSIGN(CryptohomeAuthenticator);
269 }; 272 };
270 273
271 } // namespace chromeos 274 } // namespace chromeos
272 275
273 #endif // CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_ 276 #endif // CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « chromeos/login/auth/auth_status_consumer.cc ('k') | chromeos/login/auth/cryptohome_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698