OLD | NEW |
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_FAKE_EXTENDED_AUTHENTICATOR_H_ | 5 #ifndef CHROMEOS_LOGIN_AUTH_FAKE_EXTENDED_AUTHENTICATOR_H_ |
6 #define CHROMEOS_LOGIN_AUTH_FAKE_EXTENDED_AUTHENTICATOR_H_ | 6 #define CHROMEOS_LOGIN_AUTH_FAKE_EXTENDED_AUTHENTICATOR_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chromeos/chromeos_export.h" | 9 #include "chromeos/chromeos_export.h" |
10 #include "chromeos/login/auth/extended_authenticator.h" | 10 #include "chromeos/login/auth/extended_authenticator.h" |
11 #include "chromeos/login/auth/user_context.h" | 11 #include "chromeos/login/auth/user_context.h" |
12 | 12 |
| 13 class AccountId; |
| 14 |
13 namespace chromeos { | 15 namespace chromeos { |
14 | 16 |
15 class AuthFailure; | 17 class AuthFailure; |
16 | 18 |
17 class CHROMEOS_EXPORT FakeExtendedAuthenticator : public ExtendedAuthenticator { | 19 class CHROMEOS_EXPORT FakeExtendedAuthenticator : public ExtendedAuthenticator { |
18 public: | 20 public: |
19 FakeExtendedAuthenticator(NewAuthStatusConsumer* consumer, | 21 FakeExtendedAuthenticator(NewAuthStatusConsumer* consumer, |
20 const UserContext& expected_user_context); | 22 const UserContext& expected_user_context); |
21 FakeExtendedAuthenticator(AuthStatusConsumer* consumer, | 23 FakeExtendedAuthenticator(AuthStatusConsumer* consumer, |
22 const UserContext& expected_user_context); | 24 const UserContext& expected_user_context); |
23 | 25 |
24 // ExtendedAuthenticator: | 26 // ExtendedAuthenticator: |
25 void SetConsumer(AuthStatusConsumer* consumer) override; | 27 void SetConsumer(AuthStatusConsumer* consumer) override; |
26 void AuthenticateToMount(const UserContext& context, | 28 void AuthenticateToMount(const UserContext& context, |
27 const ResultCallback& success_callback) override; | 29 const ResultCallback& success_callback) override; |
28 void AuthenticateToCheck(const UserContext& context, | 30 void AuthenticateToCheck(const UserContext& context, |
29 const base::Closure& success_callback) override; | 31 const base::Closure& success_callback) override; |
30 void CreateMount(const std::string& user_id, | 32 void CreateMount(const AccountId& account_id, |
31 const std::vector<cryptohome::KeyDefinition>& keys, | 33 const std::vector<cryptohome::KeyDefinition>& keys, |
32 const ResultCallback& success_callback) override; | 34 const ResultCallback& success_callback) override; |
33 void AddKey(const UserContext& context, | 35 void AddKey(const UserContext& context, |
34 const cryptohome::KeyDefinition& key, | 36 const cryptohome::KeyDefinition& key, |
35 bool replace_existing, | 37 bool replace_existing, |
36 const base::Closure& success_callback) override; | 38 const base::Closure& success_callback) override; |
37 void UpdateKeyAuthorized(const UserContext& context, | 39 void UpdateKeyAuthorized(const UserContext& context, |
38 const cryptohome::KeyDefinition& key, | 40 const cryptohome::KeyDefinition& key, |
39 const std::string& signature, | 41 const std::string& signature, |
40 const base::Closure& success_callback) override; | 42 const base::Closure& success_callback) override; |
(...skipping 13 matching lines...) Expand all Loading... |
54 AuthStatusConsumer* old_consumer_; | 56 AuthStatusConsumer* old_consumer_; |
55 | 57 |
56 UserContext expected_user_context_; | 58 UserContext expected_user_context_; |
57 | 59 |
58 DISALLOW_COPY_AND_ASSIGN(FakeExtendedAuthenticator); | 60 DISALLOW_COPY_AND_ASSIGN(FakeExtendedAuthenticator); |
59 }; | 61 }; |
60 | 62 |
61 } // namespace chromeos | 63 } // namespace chromeos |
62 | 64 |
63 #endif // CHROMEOS_LOGIN_AUTH_FAKE_EXTENDED_AUTHENTICATOR_H_ | 65 #endif // CHROMEOS_LOGIN_AUTH_FAKE_EXTENDED_AUTHENTICATOR_H_ |
OLD | NEW |