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

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

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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_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 namespace user_manager {
14 class UserID;
15 }
16
13 namespace chromeos { 17 namespace chromeos {
14 18
15 class AuthFailure; 19 class AuthFailure;
16 20
17 class CHROMEOS_EXPORT FakeExtendedAuthenticator : public ExtendedAuthenticator { 21 class CHROMEOS_EXPORT FakeExtendedAuthenticator : public ExtendedAuthenticator {
18 public: 22 public:
19 FakeExtendedAuthenticator(NewAuthStatusConsumer* consumer, 23 FakeExtendedAuthenticator(NewAuthStatusConsumer* consumer,
20 const UserContext& expected_user_context); 24 const UserContext& expected_user_context);
21 FakeExtendedAuthenticator(AuthStatusConsumer* consumer, 25 FakeExtendedAuthenticator(AuthStatusConsumer* consumer,
22 const UserContext& expected_user_context); 26 const UserContext& expected_user_context);
23 27
24 // ExtendedAuthenticator: 28 // ExtendedAuthenticator:
25 void SetConsumer(AuthStatusConsumer* consumer) override; 29 void SetConsumer(AuthStatusConsumer* consumer) override;
26 void AuthenticateToMount(const UserContext& context, 30 void AuthenticateToMount(const UserContext& context,
27 const ResultCallback& success_callback) override; 31 const ResultCallback& success_callback) override;
28 void AuthenticateToCheck(const UserContext& context, 32 void AuthenticateToCheck(const UserContext& context,
29 const base::Closure& success_callback) override; 33 const base::Closure& success_callback) override;
30 void CreateMount(const std::string& user_id, 34 void CreateMount(const user_manager::UserID& user_id,
31 const std::vector<cryptohome::KeyDefinition>& keys, 35 const std::vector<cryptohome::KeyDefinition>& keys,
32 const ResultCallback& success_callback) override; 36 const ResultCallback& success_callback) override;
33 void AddKey(const UserContext& context, 37 void AddKey(const UserContext& context,
34 const cryptohome::KeyDefinition& key, 38 const cryptohome::KeyDefinition& key,
35 bool replace_existing, 39 bool replace_existing,
36 const base::Closure& success_callback) override; 40 const base::Closure& success_callback) override;
37 void UpdateKeyAuthorized(const UserContext& context, 41 void UpdateKeyAuthorized(const UserContext& context,
38 const cryptohome::KeyDefinition& key, 42 const cryptohome::KeyDefinition& key,
39 const std::string& signature, 43 const std::string& signature,
40 const base::Closure& success_callback) override; 44 const base::Closure& success_callback) override;
(...skipping 13 matching lines...) Expand all
54 AuthStatusConsumer* old_consumer_; 58 AuthStatusConsumer* old_consumer_;
55 59
56 UserContext expected_user_context_; 60 UserContext expected_user_context_;
57 61
58 DISALLOW_COPY_AND_ASSIGN(FakeExtendedAuthenticator); 62 DISALLOW_COPY_AND_ASSIGN(FakeExtendedAuthenticator);
59 }; 63 };
60 64
61 } // namespace chromeos 65 } // namespace chromeos
62 66
63 #endif // CHROMEOS_LOGIN_AUTH_FAKE_EXTENDED_AUTHENTICATOR_H_ 67 #endif // CHROMEOS_LOGIN_AUTH_FAKE_EXTENDED_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698