OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_MOCK_AUTHENTICATOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/chromeos/login/authenticator.h" | 10 #include "chrome/browser/chromeos/login/authenticator.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 virtual void CompleteOffTheRecordLogin() { | 97 virtual void CompleteOffTheRecordLogin() { |
98 } | 98 } |
99 | 99 |
100 virtual Authenticator* CreateAuthenticator(LoginStatusConsumer* consumer) { | 100 virtual Authenticator* CreateAuthenticator(LoginStatusConsumer* consumer) { |
101 return new MockAuthenticator( | 101 return new MockAuthenticator( |
102 consumer, expected_username_, expected_password_); | 102 consumer, expected_username_, expected_password_); |
103 } | 103 } |
104 | 104 |
105 virtual void EnableBrowserLaunch(bool enable) { | |
106 } | |
107 | |
108 virtual bool IsBrowserLaunchEnabled() const { | |
109 return true; | |
110 } | |
111 | |
112 virtual const std::string& GetAuthToken() const { | |
113 return auth_token_; | |
114 } | |
115 | |
116 private: | 105 private: |
117 std::string expected_username_; | 106 std::string expected_username_; |
118 std::string expected_password_; | 107 std::string expected_password_; |
119 std::string auth_token_; | |
120 | 108 |
121 DISALLOW_COPY_AND_ASSIGN(MockLoginUtils); | 109 DISALLOW_COPY_AND_ASSIGN(MockLoginUtils); |
122 }; | 110 }; |
123 | 111 |
124 } // namespace chromeos | 112 } // namespace chromeos |
125 | 113 |
126 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ | 114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ |
OLD | NEW |