Index: remoting/protocol/webrtc_transport.cc |
diff --git a/remoting/protocol/webrtc_transport.cc b/remoting/protocol/webrtc_transport.cc |
index 2c82aabb9fdd1a4f601f96ab26e3c9a9cbcb04da..253293eb264e887fbee46702da8e65b042d09207 100644 |
--- a/remoting/protocol/webrtc_transport.cc |
+++ b/remoting/protocol/webrtc_transport.cc |
@@ -99,9 +99,11 @@ |
} // namespace |
-WebrtcTransport::WebrtcTransport(rtc::Thread* worker_thread, |
- PortAllocatorFactory* port_allocator_factory, |
- TransportRole role) |
+WebrtcTransport::WebrtcTransport( |
+ rtc::Thread* worker_thread, |
+ rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface> |
+ port_allocator_factory, |
+ TransportRole role) |
: port_allocator_factory_(port_allocator_factory), |
role_(role), |
worker_thread_(worker_thread), |
@@ -136,11 +138,8 @@ |
constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
webrtc::MediaConstraintsInterface::kValueTrue); |
- rtc::scoped_ptr<cricket::PortAllocator> port_allocator( |
- port_allocator_factory_->CreatePortAllocator()); |
- |
peer_connection_ = peer_connection_factory_->CreatePeerConnection( |
- rtc_config, &constraints, std::move(port_allocator), nullptr, this); |
+ rtc_config, &constraints, port_allocator_factory_, nullptr, this); |
data_stream_adapter_.Initialize(peer_connection_, |
role_ == TransportRole::SERVER); |
@@ -489,18 +488,19 @@ |
WebrtcTransportFactory::WebrtcTransportFactory( |
rtc::Thread* worker_thread, |
SignalStrategy* signal_strategy, |
- scoped_ptr<PortAllocatorFactory> port_allocator_factory, |
+ rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface> |
+ port_allocator_factory, |
TransportRole role) |
: worker_thread_(worker_thread), |
signal_strategy_(signal_strategy), |
- port_allocator_factory_(std::move(port_allocator_factory)), |
+ port_allocator_factory_(port_allocator_factory), |
role_(role) {} |
WebrtcTransportFactory::~WebrtcTransportFactory() {} |
scoped_ptr<Transport> WebrtcTransportFactory::CreateTransport() { |
- return make_scoped_ptr(new WebrtcTransport( |
- worker_thread_, port_allocator_factory_.get(), role_)); |
+ return make_scoped_ptr( |
+ new WebrtcTransport(worker_thread_, port_allocator_factory_, role_)); |
} |
} // namespace protocol |