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

Side by Side Diff: chromeos/login/auth/stub_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_STUB_AUTHENTICATOR_H_ 5 #ifndef CHROMEOS_LOGIN_AUTH_STUB_AUTHENTICATOR_H_
6 #define CHROMEOS_LOGIN_AUTH_STUB_AUTHENTICATOR_H_ 6 #define CHROMEOS_LOGIN_AUTH_STUB_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
11 #include "chromeos/chromeos_export.h" 11 #include "chromeos/chromeos_export.h"
12 #include "chromeos/login/auth/authenticator.h" 12 #include "chromeos/login/auth/authenticator.h"
13 #include "chromeos/login/auth/user_context.h" 13 #include "chromeos/login/auth/user_context.h"
14 14
15 namespace content { 15 namespace content {
16 class BrowserContext; 16 class BrowserContext;
17 } 17 }
18 18
19 namespace user_manager {
20 class UserID;
21 }
22
19 namespace chromeos { 23 namespace chromeos {
20 24
21 class AuthStatusConsumer; 25 class AuthStatusConsumer;
22 26
23 class CHROMEOS_EXPORT StubAuthenticator : public Authenticator { 27 class CHROMEOS_EXPORT StubAuthenticator : public Authenticator {
24 public: 28 public:
25 StubAuthenticator(AuthStatusConsumer* consumer, 29 StubAuthenticator(AuthStatusConsumer* consumer,
26 const UserContext& expected_user_context); 30 const UserContext& expected_user_context);
27 31
28 // Authenticator: 32 // Authenticator:
29 void CompleteLogin(content::BrowserContext* context, 33 void CompleteLogin(content::BrowserContext* context,
30 const UserContext& user_context) override; 34 const UserContext& user_context) override;
31 void AuthenticateToLogin(content::BrowserContext* context, 35 void AuthenticateToLogin(content::BrowserContext* context,
32 const UserContext& user_context) override; 36 const UserContext& user_context) override;
33 void AuthenticateToUnlock(const UserContext& user_context) override; 37 void AuthenticateToUnlock(const UserContext& user_context) override;
34 void LoginAsSupervisedUser(const UserContext& user_context) override; 38 void LoginAsSupervisedUser(const UserContext& user_context) override;
35 void LoginOffTheRecord() override; 39 void LoginOffTheRecord() override;
36 void LoginAsPublicSession(const UserContext& user_context) override; 40 void LoginAsPublicSession(const UserContext& user_context) override;
37 void LoginAsKioskAccount(const std::string& app_user_id, 41 void LoginAsKioskAccount(const user_manager::UserID& app_user_id,
38 bool use_guest_mount) override; 42 bool use_guest_mount) override;
39 void OnAuthSuccess() override; 43 void OnAuthSuccess() override;
40 void OnAuthFailure(const AuthFailure& failure) override; 44 void OnAuthFailure(const AuthFailure& failure) override;
41 void RecoverEncryptedData(const std::string& old_password) override; 45 void RecoverEncryptedData(const std::string& old_password) override;
42 void ResyncEncryptedData() override; 46 void ResyncEncryptedData() override;
43 47
44 virtual void SetExpectedCredentials(const UserContext& user_context); 48 virtual void SetExpectedCredentials(const UserContext& user_context);
45 49
46 protected: 50 protected:
47 ~StubAuthenticator() override; 51 ~StubAuthenticator() override;
48 52
49 private: 53 private:
50 UserContext expected_user_context_; 54 UserContext expected_user_context_;
51 scoped_refptr<base::MessageLoopProxy> message_loop_; 55 scoped_refptr<base::MessageLoopProxy> message_loop_;
52 56
53 DISALLOW_COPY_AND_ASSIGN(StubAuthenticator); 57 DISALLOW_COPY_AND_ASSIGN(StubAuthenticator);
54 }; 58 };
55 59
56 } // namespace chromeos 60 } // namespace chromeos
57 61
58 #endif // CHROMEOS_LOGIN_AUTH_STUB_AUTHENTICATOR_H_ 62 #endif // CHROMEOS_LOGIN_AUTH_STUB_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698