| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); | 82 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 class MockLoginUtils : public LoginUtils { | 85 class MockLoginUtils : public LoginUtils { |
| 86 public: | 86 public: |
| 87 MockLoginUtils(const std::string& expected_username, | 87 MockLoginUtils(const std::string& expected_username, |
| 88 const std::string& expected_password); | 88 const std::string& expected_password); |
| 89 virtual ~MockLoginUtils(); | 89 virtual ~MockLoginUtils(); |
| 90 | 90 |
| 91 virtual void PrepareProfile(const std::string& username, | 91 virtual void PrepareProfile(const std::string& username, |
| 92 const std::string& display_email, |
| 92 const std::string& password, | 93 const std::string& password, |
| 93 const GaiaAuthConsumer::ClientLoginResult& res, | 94 const GaiaAuthConsumer::ClientLoginResult& res, |
| 94 bool pending_requests, | 95 bool pending_requests, |
| 95 bool using_oauth, | 96 bool using_oauth, |
| 96 bool has_cookies, | 97 bool has_cookies, |
| 97 Delegate* delegate) OVERRIDE; | 98 Delegate* delegate) OVERRIDE; |
| 98 | 99 |
| 99 virtual void DelegateDeleted(Delegate* delegate) OVERRIDE; | 100 virtual void DelegateDeleted(Delegate* delegate) OVERRIDE; |
| 100 | 101 |
| 101 virtual void CompleteOffTheRecordLogin(const GURL& start_url) OVERRIDE {} | 102 virtual void CompleteOffTheRecordLogin(const GURL& start_url) OVERRIDE {} |
| 102 | 103 |
| 103 virtual void SetFirstLoginPrefs(PrefService* prefs) OVERRIDE {} | 104 virtual void SetFirstLoginPrefs(PrefService* prefs) OVERRIDE {} |
| 104 | 105 |
| 105 virtual scoped_refptr<Authenticator> CreateAuthenticator( | 106 virtual scoped_refptr<Authenticator> CreateAuthenticator( |
| 106 LoginStatusConsumer* consumer) OVERRIDE; | 107 LoginStatusConsumer* consumer) OVERRIDE; |
| 107 | 108 |
| 108 virtual void PrewarmAuthentication() OVERRIDE {} | 109 virtual void PrewarmAuthentication() OVERRIDE {} |
| 109 | 110 |
| 110 virtual void RestoreAuthenticationSession(const std::string& user_name, | 111 virtual void RestoreAuthenticationSession(Profile* profile) OVERRIDE {} |
| 111 Profile* profile) OVERRIDE {} | |
| 112 | 112 |
| 113 virtual void StartTokenServices(Profile* profile) OVERRIDE {} | 113 virtual void StartTokenServices(Profile* profile) OVERRIDE {} |
| 114 | 114 |
| 115 virtual void StartSync( | 115 virtual void StartSync( |
| 116 Profile* profile, | 116 Profile* profile, |
| 117 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE {} | 117 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE {} |
| 118 | 118 |
| 119 virtual void SetBackgroundView(BackgroundView* background_view) OVERRIDE; | 119 virtual void SetBackgroundView(BackgroundView* background_view) OVERRIDE; |
| 120 | 120 |
| 121 virtual BackgroundView* GetBackgroundView() OVERRIDE; | 121 virtual BackgroundView* GetBackgroundView() OVERRIDE; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 136 std::string expected_password_; | 136 std::string expected_password_; |
| 137 std::string auth_token_; | 137 std::string auth_token_; |
| 138 chromeos::BackgroundView* background_view_; | 138 chromeos::BackgroundView* background_view_; |
| 139 | 139 |
| 140 DISALLOW_COPY_AND_ASSIGN(MockLoginUtils); | 140 DISALLOW_COPY_AND_ASSIGN(MockLoginUtils); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 } // namespace chromeos | 143 } // namespace chromeos |
| 144 | 144 |
| 145 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ | 145 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ |
| OLD | NEW |