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" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/rand_util.h" | 13 #include "base/rand_util.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "net/base/io_buffer.h" | 15 #include "net/base/io_buffer.h" |
16 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
17 #include "remoting/base/constants.h" | 17 #include "remoting/base/constants.h" |
18 #include "remoting/protocol/p2p_stream_socket.h" | 18 #include "remoting/protocol/p2p_stream_socket.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 20 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
21 | 21 |
22 namespace remoting { | 22 namespace remoting { |
23 namespace protocol { | 23 namespace protocol { |
24 | 24 |
25 FakeChannelAuthenticator::FakeChannelAuthenticator(bool accept, bool async) | 25 FakeChannelAuthenticator::FakeChannelAuthenticator(bool accept, bool async) |
26 : result_(accept ? net::OK : net::ERR_FAILED), | 26 : result_(accept ? net::OK : net::ERR_FAILED), |
27 async_(async), | 27 async_(async), |
28 weak_factory_(this) {} | 28 weak_factory_(this) {} |
29 | 29 |
30 FakeChannelAuthenticator::~FakeChannelAuthenticator() {} | 30 FakeChannelAuthenticator::~FakeChannelAuthenticator() {} |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 const std::string& local_jid, | 221 const std::string& local_jid, |
222 const std::string& remote_jid) { | 222 const std::string& remote_jid) { |
223 std::unique_ptr<FakeAuthenticator> authenticator(new FakeAuthenticator( | 223 std::unique_ptr<FakeAuthenticator> authenticator(new FakeAuthenticator( |
224 FakeAuthenticator::HOST, round_trips_, action_, async_)); | 224 FakeAuthenticator::HOST, round_trips_, action_, async_)); |
225 authenticator->set_messages_till_started(messages_till_started_); | 225 authenticator->set_messages_till_started(messages_till_started_); |
226 return std::move(authenticator); | 226 return std::move(authenticator); |
227 } | 227 } |
228 | 228 |
229 } // namespace protocol | 229 } // namespace protocol |
230 } // namespace remoting | 230 } // namespace remoting |
OLD | NEW |