| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_HOST_USER_AUTHENTICATOR_FAKE_H_ | |
| 6 #define REMOTING_HOST_USER_AUTHENTICATOR_FAKE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "remoting/host/user_authenticator.h" | |
| 12 | |
| 13 namespace remoting { | |
| 14 | |
| 15 // A fake UserAuthenticator, which accepts all but one user/password pair. | |
| 16 class UserAuthenticatorFake : public UserAuthenticator { | |
| 17 public: | |
| 18 UserAuthenticatorFake(); | |
| 19 virtual ~UserAuthenticatorFake(); | |
| 20 | |
| 21 virtual bool Authenticate(const std::string& username, | |
| 22 const std::string& password); | |
| 23 | |
| 24 // Get the user/password pair that a UserAuthenticatorFake rejects. | |
| 25 static const char* fail_username(); | |
| 26 static const char* fail_password(); | |
| 27 | |
| 28 private: | |
| 29 DISALLOW_COPY_AND_ASSIGN(UserAuthenticatorFake); | |
| 30 }; | |
| 31 | |
| 32 } // namespace remoting | |
| 33 | |
| 34 #endif // REMOTING_HOST_USER_AUTHENTICATOR_FAKE_H_ | |
| OLD | NEW |