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 #include "remoting/protocol/fake_authenticator.h" | 5 #include "remoting/protocol/fake_authenticator.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 } | 203 } |
204 | 204 |
205 FakeHostAuthenticatorFactory::FakeHostAuthenticatorFactory( | 205 FakeHostAuthenticatorFactory::FakeHostAuthenticatorFactory( |
206 int round_trips, int messages_till_started, | 206 int round_trips, int messages_till_started, |
207 FakeAuthenticator::Action action, bool async) | 207 FakeAuthenticator::Action action, bool async) |
208 : round_trips_(round_trips), | 208 : round_trips_(round_trips), |
209 messages_till_started_(messages_till_started), | 209 messages_till_started_(messages_till_started), |
210 action_(action), async_(async) { | 210 action_(action), async_(async) { |
211 } | 211 } |
212 | 212 |
213 FakeHostAuthenticatorFactory::~FakeHostAuthenticatorFactory() { | 213 FakeHostAuthenticatorFactory::~FakeHostAuthenticatorFactory() {} |
214 } | |
215 | 214 |
216 scoped_ptr<Authenticator> FakeHostAuthenticatorFactory::CreateAuthenticator( | 215 scoped_ptr<Authenticator> FakeHostAuthenticatorFactory::CreateAuthenticator( |
217 const std::string& local_jid, | 216 const std::string& local_jid, |
218 const std::string& remote_jid, | 217 const std::string& remote_jid) { |
219 const buzz::XmlElement* first_message) { | |
220 scoped_ptr<FakeAuthenticator> authenticator(new FakeAuthenticator( | 218 scoped_ptr<FakeAuthenticator> authenticator(new FakeAuthenticator( |
221 FakeAuthenticator::HOST, round_trips_, action_, async_)); | 219 FakeAuthenticator::HOST, round_trips_, action_, async_)); |
222 authenticator->set_messages_till_started(messages_till_started_); | 220 authenticator->set_messages_till_started(messages_till_started_); |
223 return std::move(authenticator); | 221 return std::move(authenticator); |
224 } | 222 } |
225 | 223 |
226 } // namespace protocol | 224 } // namespace protocol |
227 } // namespace remoting | 225 } // namespace remoting |
OLD | NEW |