| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); | 74 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 class MockLoginUtils : public LoginUtils { | 77 class MockLoginUtils : public LoginUtils { |
| 78 public: | 78 public: |
| 79 MockLoginUtils(const std::string& expected_username, | 79 MockLoginUtils(const std::string& expected_username, |
| 80 const std::string& expected_password); | 80 const std::string& expected_password); |
| 81 virtual ~MockLoginUtils(); | 81 virtual ~MockLoginUtils(); |
| 82 | 82 |
| 83 virtual void PrepareProfile(const std::string& username, | 83 virtual void PrepareProfile(const std::string& username, |
| 84 const std::string& display_email, |
| 84 const std::string& password, | 85 const std::string& password, |
| 85 const GaiaAuthConsumer::ClientLoginResult& res, | 86 const GaiaAuthConsumer::ClientLoginResult& res, |
| 86 bool pending_requests, | 87 bool pending_requests, |
| 87 bool using_oauth, | 88 bool using_oauth, |
| 88 bool has_cookies, | 89 bool has_cookies, |
| 89 Delegate* delegate) OVERRIDE; | 90 Delegate* delegate) OVERRIDE; |
| 90 | 91 |
| 91 virtual void DelegateDeleted(Delegate* delegate) OVERRIDE; | 92 virtual void DelegateDeleted(Delegate* delegate) OVERRIDE; |
| 92 | 93 |
| 93 virtual void CompleteOffTheRecordLogin(const GURL& start_url) OVERRIDE {} | 94 virtual void CompleteOffTheRecordLogin(const GURL& start_url) OVERRIDE {} |
| 94 | 95 |
| 95 virtual void SetFirstLoginPrefs(PrefService* prefs) OVERRIDE {} | 96 virtual void SetFirstLoginPrefs(PrefService* prefs) OVERRIDE {} |
| 96 | 97 |
| 97 virtual scoped_refptr<Authenticator> CreateAuthenticator( | 98 virtual scoped_refptr<Authenticator> CreateAuthenticator( |
| 98 LoginStatusConsumer* consumer) OVERRIDE; | 99 LoginStatusConsumer* consumer) OVERRIDE; |
| 99 | 100 |
| 100 virtual void PrewarmAuthentication() OVERRIDE {} | 101 virtual void PrewarmAuthentication() OVERRIDE {} |
| 101 | 102 |
| 102 virtual void RestoreAuthenticationSession(const std::string& user_name, | 103 virtual void RestoreAuthenticationSession(Profile* profile) OVERRIDE {} |
| 103 Profile* profile) OVERRIDE {} | |
| 104 | 104 |
| 105 virtual void StartTokenServices(Profile* profile) OVERRIDE {} | 105 virtual void StartTokenServices(Profile* profile) OVERRIDE {} |
| 106 | 106 |
| 107 virtual void StartSync( | 107 virtual void StartSync( |
| 108 Profile* profile, | 108 Profile* profile, |
| 109 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE {} | 109 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE {} |
| 110 | 110 |
| 111 virtual void SetBackgroundView(BackgroundView* background_view) OVERRIDE; | 111 virtual void SetBackgroundView(BackgroundView* background_view) OVERRIDE; |
| 112 | 112 |
| 113 virtual BackgroundView* GetBackgroundView() OVERRIDE; | 113 virtual BackgroundView* GetBackgroundView() OVERRIDE; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 128 std::string expected_password_; | 128 std::string expected_password_; |
| 129 std::string auth_token_; | 129 std::string auth_token_; |
| 130 chromeos::BackgroundView* background_view_; | 130 chromeos::BackgroundView* background_view_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(MockLoginUtils); | 132 DISALLOW_COPY_AND_ASSIGN(MockLoginUtils); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 } // namespace chromeos | 135 } // namespace chromeos |
| 136 | 136 |
| 137 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ | 137 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ |
| OLD | NEW |