OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_ | 5 #ifndef REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_ |
6 #define REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_ | 6 #define REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 class FakeHostAuthenticatorFactory : public AuthenticatorFactory { | 94 class FakeHostAuthenticatorFactory : public AuthenticatorFactory { |
95 public: | 95 public: |
96 FakeHostAuthenticatorFactory( | 96 FakeHostAuthenticatorFactory( |
97 int round_trips, int messages_till_start, | 97 int round_trips, int messages_till_start, |
98 FakeAuthenticator::Action action, bool async); | 98 FakeAuthenticator::Action action, bool async); |
99 ~FakeHostAuthenticatorFactory() override; | 99 ~FakeHostAuthenticatorFactory() override; |
100 | 100 |
101 // AuthenticatorFactory interface. | 101 // AuthenticatorFactory interface. |
102 scoped_ptr<Authenticator> CreateAuthenticator( | 102 scoped_ptr<Authenticator> CreateAuthenticator( |
103 const std::string& local_jid, | 103 const std::string& local_jid, |
104 const std::string& remote_jid, | 104 const std::string& remote_jid) override; |
105 const buzz::XmlElement* first_message) override; | |
106 | 105 |
107 private: | 106 private: |
108 int round_trips_; | 107 int round_trips_; |
109 int messages_till_started_; | 108 int messages_till_started_; |
110 FakeAuthenticator::Action action_; | 109 FakeAuthenticator::Action action_; |
111 bool async_; | 110 bool async_; |
112 | 111 |
113 DISALLOW_COPY_AND_ASSIGN(FakeHostAuthenticatorFactory); | 112 DISALLOW_COPY_AND_ASSIGN(FakeHostAuthenticatorFactory); |
114 }; | 113 }; |
115 | 114 |
116 } // namespace protocol | 115 } // namespace protocol |
117 } // namespace remoting | 116 } // namespace remoting |
118 | 117 |
119 #endif // REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_ | 118 #endif // REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_ |
OLD | NEW |