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

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

Issue 2797163002: cryptohome: Make CryptohomeClient::Unmount non-blocking (Closed)
Patch Set: 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
« no previous file with comments | « chromeos/dbus/mock_cryptohome_client.h ('k') | chromeos/login/auth/cryptohome_authenticator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
15 #include "base/task_runner.h" 15 #include "base/task_runner.h"
16 #include "chromeos/chromeos_export.h" 16 #include "chromeos/chromeos_export.h"
17 #include "chromeos/dbus/dbus_method_call_status.h"
17 #include "chromeos/login/auth/auth_attempt_state.h" 18 #include "chromeos/login/auth/auth_attempt_state.h"
18 #include "chromeos/login/auth/auth_attempt_state_resolver.h" 19 #include "chromeos/login/auth/auth_attempt_state_resolver.h"
19 #include "chromeos/login/auth/authenticator.h" 20 #include "chromeos/login/auth/authenticator.h"
20 #include "chromeos/login/auth/test_attempt_state.h" 21 #include "chromeos/login/auth/test_attempt_state.h"
21 #include "google_apis/gaia/gaia_auth_consumer.h" 22 #include "google_apis/gaia/gaia_auth_consumer.h"
22 23
23 class AuthFailure; 24 class AuthFailure;
24 25
25 namespace content { 26 namespace content {
26 class BrowserContext; 27 class BrowserContext;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 void SetOwnerState(bool owner_check_finished, bool check_result); 230 void SetOwnerState(bool owner_check_finished, bool check_result);
230 231
231 // checks if the current mounted home contains the owner case and either 232 // checks if the current mounted home contains the owner case and either
232 // continues or fails the log-in. Used for policy lost mitigation "safe-mode". 233 // continues or fails the log-in. Used for policy lost mitigation "safe-mode".
233 // Returns true if the owner check has been successful or if it is not needed. 234 // Returns true if the owner check has been successful or if it is not needed.
234 bool VerifyOwner(); 235 bool VerifyOwner();
235 236
236 // Handles completion of the ownership check and continues login. 237 // Handles completion of the ownership check and continues login.
237 void OnOwnershipChecked(bool is_owner); 238 void OnOwnershipChecked(bool is_owner);
238 239
240 // Handles completion of cryptohome unmount.
241 void OnUnmount(DBusMethodCallStatus call_status, bool success);
242
239 // Signal login completion status for cases when a new user is added via 243 // Signal login completion status for cases when a new user is added via
240 // an external authentication provider (i.e. GAIA extension). 244 // an external authentication provider (i.e. GAIA extension).
241 void ResolveLoginCompletionStatus(); 245 void ResolveLoginCompletionStatus();
242 246
243 scoped_refptr<base::TaskRunner> task_runner_; 247 scoped_refptr<base::TaskRunner> task_runner_;
244 248
245 std::unique_ptr<AuthAttemptState> current_state_; 249 std::unique_ptr<AuthAttemptState> current_state_;
246 bool migrate_attempted_; 250 bool migrate_attempted_;
247 bool remove_attempted_; 251 bool remove_attempted_;
248 bool resync_attempted_; 252 bool resync_attempted_;
(...skipping 18 matching lines...) Expand all
267 // When |remove_user_data_on_failure_| is set, we delay calling 271 // When |remove_user_data_on_failure_| is set, we delay calling
268 // consumer_->OnAuthFailure() until we removed the user cryptohome. 272 // consumer_->OnAuthFailure() until we removed the user cryptohome.
269 const AuthFailure* delayed_login_failure_; 273 const AuthFailure* delayed_login_failure_;
270 274
271 DISALLOW_COPY_AND_ASSIGN(CryptohomeAuthenticator); 275 DISALLOW_COPY_AND_ASSIGN(CryptohomeAuthenticator);
272 }; 276 };
273 277
274 } // namespace chromeos 278 } // namespace chromeos
275 279
276 #endif // CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_ 280 #endif // CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/mock_cryptohome_client.h ('k') | chromeos/login/auth/cryptohome_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698