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

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

Issue 391373002: Refactoring : Move AuthAttempt and Authenticators to chromeos/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge w/ToT Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/login/auth/authenticator.cc ('k') | chromeos/login/auth/extended_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 CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_H_ 5 #ifndef CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_H_ 6 #define CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "chromeos/chromeos_export.h"
15 #include "chromeos/cryptohome/cryptohome_parameters.h" 16 #include "chromeos/cryptohome/cryptohome_parameters.h"
16 #include "third_party/cros_system_api/dbus/service_constants.h" 17 #include "third_party/cros_system_api/dbus/service_constants.h"
17 18
18 namespace chromeos { 19 namespace chromeos {
19 20
20 class AuthStatusConsumer; 21 class AuthStatusConsumer;
21 class UserContext; 22 class UserContext;
22 23
23 // Interaction with cryptohomed: mount home dirs, create new home dirs, update 24 // Interaction with cryptohomed: mount home dirs, create new home dirs, update
24 // passwords. 25 // passwords.
25 // 26 //
26 // Typical flow: 27 // Typical flow:
27 // AuthenticateToMount() calls cryptohomed to perform offline login, 28 // AuthenticateToMount() calls cryptohomed to perform offline login,
28 // AuthenticateToCreate() calls cryptohomed to create new cryptohome. 29 // AuthenticateToCreate() calls cryptohomed to create new cryptohome.
29 class ExtendedAuthenticator 30 class CHROMEOS_EXPORT ExtendedAuthenticator
30 : public base::RefCountedThreadSafe<ExtendedAuthenticator> { 31 : public base::RefCountedThreadSafe<ExtendedAuthenticator> {
31 public: 32 public:
32 enum AuthState { 33 enum AuthState {
33 SUCCESS, // Login succeeded. 34 SUCCESS, // Login succeeded.
34 NO_MOUNT, // No cryptohome exist for user. 35 NO_MOUNT, // No cryptohome exist for user.
35 FAILED_MOUNT, // Failed to mount existing cryptohome - login failed. 36 FAILED_MOUNT, // Failed to mount existing cryptohome - login failed.
36 FAILED_TPM, // Failed to mount/create cryptohome because of TPM error. 37 FAILED_TPM, // Failed to mount/create cryptohome because of TPM error.
37 }; 38 };
38 39
39 typedef base::Callback<void(const std::string& result)> ResultCallback; 40 typedef base::Callback<void(const std::string& result)> ResultCallback;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 std::vector<base::Closure> system_salt_callbacks_; 152 std::vector<base::Closure> system_salt_callbacks_;
152 153
153 NewAuthStatusConsumer* consumer_; 154 NewAuthStatusConsumer* consumer_;
154 AuthStatusConsumer* old_consumer_; 155 AuthStatusConsumer* old_consumer_;
155 156
156 DISALLOW_COPY_AND_ASSIGN(ExtendedAuthenticator); 157 DISALLOW_COPY_AND_ASSIGN(ExtendedAuthenticator);
157 }; 158 };
158 159
159 } // namespace chromeos 160 } // namespace chromeos
160 161
161 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_H_ 162 #endif // CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « chromeos/login/auth/authenticator.cc ('k') | chromeos/login/auth/extended_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698