Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / mock_authenticator.h
blob12e22e44a35f19e3d4f683b2934d8f2c0cf86d92
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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_
8 #include <string>
10 #include "chrome/browser/chromeos/login/authenticator.h"
11 #include "testing/gtest/include/gtest/gtest.h"
13 class Profile;
15 namespace chromeos {
17 class LoginStatusConsumer;
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) {
29 virtual void CompleteLogin(Profile* profile,
30 const UserContext& user_context) OVERRIDE;
32 virtual void AuthenticateToLogin(Profile* profile,
33 const UserContext& user_context) OVERRIDE;
35 virtual void AuthenticateToUnlock(const UserContext& user_context) OVERRIDE;
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) OVERRIDE;
42 virtual void LoginOffTheRecord() OVERRIDE;
44 virtual void OnRetailModeLoginSuccess() OVERRIDE;
46 virtual void OnLoginSuccess() OVERRIDE;
48 virtual void OnLoginFailure(const LoginFailure& failure) OVERRIDE;
50 virtual void RecoverEncryptedData(
51 const std::string& old_password) OVERRIDE {}
53 virtual void ResyncEncryptedData() OVERRIDE {}
55 virtual void SetExpectedCredentials(const std::string& expected_username,
56 const std::string& expected_password);
58 protected:
59 virtual ~MockAuthenticator() {}
61 private:
62 std::string expected_username_;
63 std::string expected_password_;
65 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator);
68 } // namespace chromeos
70 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_