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

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

Issue 681593003: Revert of Extract LoginPerformer to chromeos/auth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/login/auth/login_performer.cc ('k') | chromeos/login/auth/mock_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_MOCK_AUTHENTICATOR_H_ 5 #ifndef CHROMEOS_LOGIN_AUTH_MOCK_AUTHENTICATOR_H_
6 #define CHROMEOS_LOGIN_AUTH_MOCK_AUTHENTICATOR_H_ 6 #define CHROMEOS_LOGIN_AUTH_MOCK_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 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace content { 16 class Profile;
17 class BrowserContext;
18 }
19 17
20 namespace chromeos { 18 namespace chromeos {
21 19
22 class AuthStatusConsumer; 20 class AuthStatusConsumer;
23 21
24 class CHROMEOS_EXPORT MockAuthenticator : public Authenticator { 22 class CHROMEOS_EXPORT MockAuthenticator : public Authenticator {
25 public: 23 public:
26 MockAuthenticator(AuthStatusConsumer* consumer, 24 MockAuthenticator(AuthStatusConsumer* consumer,
27 const UserContext& expected_user_context); 25 const UserContext& expected_user_context);
28 26
29 // Authenticator: 27 // Authenticator:
30 virtual void CompleteLogin(content::BrowserContext* context, 28 virtual void CompleteLogin(Profile* profile,
31 const UserContext& user_context) override; 29 const UserContext& user_context) override;
32 virtual void AuthenticateToLogin(content::BrowserContext* context, 30 virtual void AuthenticateToLogin(Profile* profile,
33 const UserContext& user_context) override; 31 const UserContext& user_context) override;
34 virtual void AuthenticateToUnlock(const UserContext& user_context) override; 32 virtual void AuthenticateToUnlock(const UserContext& user_context) override;
35 virtual void LoginAsSupervisedUser(const UserContext& user_context) override; 33 virtual void LoginAsSupervisedUser(const UserContext& user_context) override;
36 virtual void LoginRetailMode() override; 34 virtual void LoginRetailMode() override;
37 virtual void LoginOffTheRecord() override; 35 virtual void LoginOffTheRecord() override;
38 virtual void LoginAsPublicSession(const UserContext& user_context) override; 36 virtual void LoginAsPublicSession(const UserContext& user_context) override;
39 virtual void LoginAsKioskAccount(const std::string& app_user_id, 37 virtual void LoginAsKioskAccount(const std::string& app_user_id,
40 bool use_guest_mount) override; 38 bool use_guest_mount) override;
41 virtual void OnRetailModeAuthSuccess() override; 39 virtual void OnRetailModeAuthSuccess() override;
42 virtual void OnAuthSuccess() override; 40 virtual void OnAuthSuccess() override;
43 virtual void OnAuthFailure(const AuthFailure& failure) override; 41 virtual void OnAuthFailure(const AuthFailure& failure) override;
44 virtual void RecoverEncryptedData(const std::string& old_password) override; 42 virtual void RecoverEncryptedData(const std::string& old_password) override;
45 virtual void ResyncEncryptedData() override; 43 virtual void ResyncEncryptedData() override;
46 44
47 virtual void SetExpectedCredentials(const UserContext& user_context); 45 virtual void SetExpectedCredentials(const UserContext& user_context);
48 46
49 protected: 47 protected:
50 virtual ~MockAuthenticator(); 48 virtual ~MockAuthenticator();
51 49
52 private: 50 private:
53 UserContext expected_user_context_; 51 UserContext expected_user_context_;
54 scoped_refptr<base::MessageLoopProxy> message_loop_; 52 scoped_refptr<base::MessageLoopProxy> message_loop_;
55 53
56 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); 54 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator);
57 }; 55 };
58 56
59 } // namespace chromeos 57 } // namespace chromeos
60 58
61 #endif // CHROMEOS_LOGIN_AUTH_MOCK_AUTHENTICATOR_H_ 59 #endif // CHROMEOS_LOGIN_AUTH_MOCK_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « chromeos/login/auth/login_performer.cc ('k') | chromeos/login/auth/mock_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698