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

Side by Side Diff: chrome/browser/chromeos/login/mock_authenticator.h

Issue 286933002: [cros login] Split login related classes into subfolders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes in new tests Created 6 years, 7 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_
7
8 #include <string>
9
10 #include "chrome/browser/chromeos/login/authenticator.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 class Profile;
14
15 namespace chromeos {
16
17 class LoginStatusConsumer;
18
19 class MockAuthenticator : public Authenticator {
20 public:
21 MockAuthenticator(LoginStatusConsumer* consumer,
22 const std::string& expected_username,
23 const std::string& expected_password)
24 : Authenticator(consumer),
25 expected_username_(expected_username),
26 expected_password_(expected_password) {
27 }
28
29 virtual void CompleteLogin(Profile* profile,
30 const UserContext& user_context) OVERRIDE;
31
32 virtual void AuthenticateToLogin(Profile* profile,
33 const UserContext& user_context) OVERRIDE;
34
35 virtual void AuthenticateToUnlock(const UserContext& user_context) OVERRIDE;
36
37 virtual void LoginAsLocallyManagedUser(
38 const UserContext& user_context) OVERRIDE;
39 virtual void LoginRetailMode() OVERRIDE;
40 virtual void LoginAsPublicAccount(const std::string& username) OVERRIDE;
41 virtual void LoginAsKioskAccount(const std::string& app_user_id,
42 bool use_guest_mount) OVERRIDE;
43 virtual void LoginOffTheRecord() OVERRIDE;
44
45 virtual void OnRetailModeLoginSuccess() OVERRIDE;
46
47 virtual void OnLoginSuccess() OVERRIDE;
48
49 virtual void OnLoginFailure(const LoginFailure& failure) OVERRIDE;
50
51 virtual void RecoverEncryptedData(
52 const std::string& old_password) OVERRIDE {}
53
54 virtual void ResyncEncryptedData() OVERRIDE {}
55
56 virtual void SetExpectedCredentials(const std::string& expected_username,
57 const std::string& expected_password);
58
59 protected:
60 virtual ~MockAuthenticator() {}
61
62 private:
63 std::string expected_username_;
64 std::string expected_password_;
65
66 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator);
67 };
68
69 } // namespace chromeos
70
71 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mock_auth_attempt_state_resolver.cc ('k') | chrome/browser/chromeos/login/mock_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698