OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/transport_context.h" | 5 #include "remoting/protocol/transport_context.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #endif // !defined(OS_NACL) | 24 #endif // !defined(OS_NACL) |
25 | 25 |
26 namespace remoting { | 26 namespace remoting { |
27 namespace protocol { | 27 namespace protocol { |
28 | 28 |
29 #if !defined(OS_NACL) | 29 #if !defined(OS_NACL) |
30 // static | 30 // static |
31 scoped_refptr<TransportContext> TransportContext::ForTests(TransportRole role) { | 31 scoped_refptr<TransportContext> TransportContext::ForTests(TransportRole role) { |
32 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); | 32 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); |
33 return new protocol::TransportContext( | 33 return new protocol::TransportContext( |
34 nullptr, base::WrapUnique(new protocol::ChromiumPortAllocatorFactory()), | 34 nullptr, base::MakeUnique<protocol::ChromiumPortAllocatorFactory>(), |
35 nullptr, protocol::NetworkSettings( | 35 nullptr, protocol::NetworkSettings( |
36 protocol::NetworkSettings::NAT_TRAVERSAL_OUTGOING), | 36 protocol::NetworkSettings::NAT_TRAVERSAL_OUTGOING), |
37 role); | 37 role); |
38 } | 38 } |
39 #endif // !defined(OS_NACL) | 39 #endif // !defined(OS_NACL) |
40 | 40 |
41 TransportContext::TransportContext( | 41 TransportContext::TransportContext( |
42 SignalStrategy* signal_strategy, | 42 SignalStrategy* signal_strategy, |
43 std::unique_ptr<PortAllocatorFactory> port_allocator_factory, | 43 std::unique_ptr<PortAllocatorFactory> port_allocator_factory, |
44 std::unique_ptr<UrlRequestFactory> url_request_factory, | 44 std::unique_ptr<UrlRequestFactory> url_request_factory, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 auto& callback_list = pending_ice_config_callbacks_[relay_mode]; | 109 auto& callback_list = pending_ice_config_callbacks_[relay_mode]; |
110 while (!callback_list.empty()) { | 110 while (!callback_list.empty()) { |
111 callback_list.begin()->Run(ice_config); | 111 callback_list.begin()->Run(ice_config); |
112 callback_list.pop_front(); | 112 callback_list.pop_front(); |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 } // namespace protocol | 116 } // namespace protocol |
117 } // namespace remoting | 117 } // namespace remoting |
OLD | NEW |