| 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 #include "chrome/browser/chromeos/login/mock_authenticator.h" | 5 #include "chrome/browser/chromeos/login/mock_authenticator.h" |
| 6 | 6 |
| 7 namespace chromeos { | 7 namespace chromeos { |
| 8 | 8 |
| 9 bool MockAuthenticator::AuthenticateToLogin(Profile* profile, | 9 bool MockAuthenticator::AuthenticateToLogin(Profile* profile, |
| 10 const std::string& username, | 10 const std::string& username, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 bool MockLoginUtils::ShouldWaitForWifi() { | 83 bool MockLoginUtils::ShouldWaitForWifi() { |
| 84 return false; | 84 return false; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void MockLoginUtils::PrepareProfile( | 87 void MockLoginUtils::PrepareProfile( |
| 88 const std::string& username, | 88 const std::string& username, |
| 89 const std::string& password, | 89 const std::string& password, |
| 90 const GaiaAuthConsumer::ClientLoginResult& res, | 90 const GaiaAuthConsumer::ClientLoginResult& res, |
| 91 bool pending_requests, | 91 bool pending_requests, |
| 92 bool using_oauth, | 92 bool using_oauth, |
| 93 bool has_cookies, |
| 93 Delegate* delegate) { | 94 Delegate* delegate) { |
| 94 DCHECK_EQ(expected_username_, username); | 95 DCHECK_EQ(expected_username_, username); |
| 95 DCHECK_EQ(expected_password_, password); | 96 DCHECK_EQ(expected_password_, password); |
| 96 // Profile hasn't been loaded. | 97 // Profile hasn't been loaded. |
| 97 delegate->OnProfilePrepared(NULL); | 98 delegate->OnProfilePrepared(NULL); |
| 98 } | 99 } |
| 99 | 100 |
| 100 Authenticator* MockLoginUtils::CreateAuthenticator( | 101 Authenticator* MockLoginUtils::CreateAuthenticator( |
| 101 LoginStatusConsumer* consumer) { | 102 LoginStatusConsumer* consumer) { |
| 102 return new MockAuthenticator( | 103 return new MockAuthenticator( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 117 CommandLine* command_line) { | 118 CommandLine* command_line) { |
| 118 return std::string(); | 119 return std::string(); |
| 119 } | 120 } |
| 120 | 121 |
| 121 bool MockLoginUtils::TransferDefaultCookies(Profile* default_profile, | 122 bool MockLoginUtils::TransferDefaultCookies(Profile* default_profile, |
| 122 Profile* new_profile) { | 123 Profile* new_profile) { |
| 123 return true; | 124 return true; |
| 124 } | 125 } |
| 125 | 126 |
| 126 } // namespace chromeos | 127 } // namespace chromeos |
| OLD | NEW |