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

Side by Side Diff: chromeos/login/auth/mock_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 with 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
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_MOCK_AUTHENTICATOR_H_ 5 #ifndef CHROMEOS_LOGIN_AUTH_MOCK_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_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 "chrome/browser/chromeos/login/auth/authenticator.h" 10 #include "chromeos/chromeos_export.h"
11 #include "chromeos/login/auth/authenticator.h"
11 #include "chromeos/login/auth/user_context.h" 12 #include "chromeos/login/auth/user_context.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 14
14 class Profile; 15 class Profile;
15 16
16 namespace chromeos { 17 namespace chromeos {
17 18
18 class AuthStatusConsumer; 19 class AuthStatusConsumer;
19 20
20 class MockAuthenticator : public Authenticator { 21 class CHROMEOS_EXPORT MockAuthenticator : public Authenticator {
21 public: 22 public:
22 MockAuthenticator(AuthStatusConsumer* consumer, 23 MockAuthenticator(AuthStatusConsumer* consumer,
23 const UserContext& expected_user_context); 24 const UserContext& expected_user_context);
24 25
25 // Authenticator: 26 // Authenticator:
26 virtual void CompleteLogin(Profile* profile, 27 virtual void CompleteLogin(Profile* profile,
27 const UserContext& user_context) OVERRIDE; 28 const UserContext& user_context) OVERRIDE;
28 virtual void AuthenticateToLogin(Profile* profile, 29 virtual void AuthenticateToLogin(Profile* profile,
29 const UserContext& user_context) OVERRIDE; 30 const UserContext& user_context) OVERRIDE;
30 virtual void AuthenticateToUnlock(const UserContext& user_context) OVERRIDE; 31 virtual void AuthenticateToUnlock(const UserContext& user_context) OVERRIDE;
31 virtual void LoginAsLocallyManagedUser( 32 virtual void LoginAsLocallyManagedUser(
32 const UserContext& user_context) OVERRIDE; 33 const UserContext& user_context) OVERRIDE;
33 virtual void LoginRetailMode() OVERRIDE; 34 virtual void LoginRetailMode() OVERRIDE;
34 virtual void LoginOffTheRecord() OVERRIDE; 35 virtual void LoginOffTheRecord() OVERRIDE;
35 virtual void LoginAsPublicAccount(const std::string& username) OVERRIDE; 36 virtual void LoginAsPublicAccount(const std::string& username) OVERRIDE;
36 virtual void LoginAsKioskAccount(const std::string& app_user_id, 37 virtual void LoginAsKioskAccount(const std::string& app_user_id,
37 bool use_guest_mount) OVERRIDE; 38 bool use_guest_mount) OVERRIDE;
38 virtual void OnRetailModeAuthSuccess() OVERRIDE; 39 virtual void OnRetailModeAuthSuccess() OVERRIDE;
39 virtual void OnAuthSuccess() OVERRIDE; 40 virtual void OnAuthSuccess() OVERRIDE;
40 virtual void OnAuthFailure(const AuthFailure& failure) OVERRIDE; 41 virtual void OnAuthFailure(const AuthFailure& failure) OVERRIDE;
41 virtual void RecoverEncryptedData( 42 virtual void RecoverEncryptedData(const std::string& old_password) OVERRIDE;
42 const std::string& old_password) OVERRIDE;
43 virtual void ResyncEncryptedData() OVERRIDE; 43 virtual void ResyncEncryptedData() OVERRIDE;
44 44
45 virtual void SetExpectedCredentials(const UserContext& user_context); 45 virtual void SetExpectedCredentials(const UserContext& user_context);
46 46
47 protected: 47 protected:
48 virtual ~MockAuthenticator(); 48 virtual ~MockAuthenticator();
49 49
50 private: 50 private:
51 UserContext expected_user_context_; 51 UserContext expected_user_context_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); 53 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator);
54 }; 54 };
55 55
56 } // namespace chromeos 56 } // namespace chromeos
57 57
58 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_MOCK_AUTHENTICATOR_H_ 58 #endif // CHROMEOS_LOGIN_AUTH_MOCK_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698