Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Unified Diff: remoting/protocol/webrtc_transport.cc

Issue 1500663003: Removing references to webrtc::PortAllocatorFactoryInterface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-adding PortAllocatorFactoryInterface, for use with WebrtcTransport. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/webrtc_transport.cc
diff --git a/remoting/protocol/webrtc_transport.cc b/remoting/protocol/webrtc_transport.cc
index 3a6ad6ffa8bc15acac88eabc886310099870f38c..e1093e5d85b01a85ae6a2460cb015c5d52e6e6c0 100644
--- a/remoting/protocol/webrtc_transport.cc
+++ b/remoting/protocol/webrtc_transport.cc
@@ -108,8 +108,7 @@ class SetSessionDescriptionObserver
} // namespace
WebrtcTransport::WebrtcTransport(
- rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface>
- port_allocator_factory,
+ scoped_refptr<PortAllocatorFactoryInterface> port_allocator_factory,
TransportRole role,
scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner)
: port_allocator_factory_(port_allocator_factory),
@@ -250,8 +249,11 @@ void WebrtcTransport::DoStart(rtc::Thread* worker_thread) {
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, port_allocator_factory_, nullptr, this);
+ rtc_config, &constraints, std::move(port_allocator), nullptr, this);
data_stream_adapter_.Initialize(peer_connection_,
role_ == TransportRole::SERVER);
@@ -473,8 +475,7 @@ void WebrtcTransport::AddPendingCandidatesIfPossible() {
WebrtcTransportFactory::WebrtcTransportFactory(
SignalStrategy* signal_strategy,
- rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface>
- port_allocator_factory,
+ scoped_refptr<PortAllocatorFactoryInterface> port_allocator_factory,
TransportRole role)
: signal_strategy_(signal_strategy),
port_allocator_factory_(port_allocator_factory),

Powered by Google App Engine
This is Rietveld 408576698