| 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 "remoting/host/user_authenticator_fake.h" | 5 #include "remoting/host/user_authenticator_fake.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 namespace remoting { | 9 namespace remoting { |
| 10 | 10 |
| 11 UserAuthenticatorFake::UserAuthenticatorFake() {} | 11 UserAuthenticatorFake::UserAuthenticatorFake() {} |
| 12 UserAuthenticatorFake::~UserAuthenticatorFake() {} | 12 UserAuthenticatorFake::~UserAuthenticatorFake() {} |
| 13 | 13 |
| 14 bool UserAuthenticatorFake::Authenticate(const std::string& username, | 14 bool UserAuthenticatorFake::Authenticate(const std::string& username, |
| 15 const std::string& password) { | 15 const std::string& password) { |
| 16 return true; | 16 return (username.compare(fail_username()) || |
| 17 password.compare(fail_password())); |
| 18 } |
| 19 |
| 20 const char* UserAuthenticatorFake::fail_username() { |
| 21 return "userfail"; |
| 22 } |
| 23 |
| 24 const char* UserAuthenticatorFake::fail_password() { |
| 25 return "passwordfail"; |
| 17 } | 26 } |
| 18 | 27 |
| 19 } // namespace remoting | 28 } // namespace remoting |
| OLD | NEW |