Chromium Code Reviews| Index: webrtc/p2p/base/transportcontroller.cc |
| diff --git a/webrtc/p2p/base/transportcontroller.cc b/webrtc/p2p/base/transportcontroller.cc |
| index 128d2fc656406d75b7b094baf1e8a57cd32513e1..04c4229433fcf80a0958c7e156cbba4fc88cc56d 100644 |
| --- a/webrtc/p2p/base/transportcontroller.cc |
| +++ b/webrtc/p2p/base/transportcontroller.cc |
| @@ -19,6 +19,11 @@ |
| #include "webrtc/p2p/base/p2ptransport.h" |
| #include "webrtc/p2p/base/port.h" |
| +#ifdef USE_QUIC |
| +#include "webrtc/p2p/base/p2ptransportchannel.h" |
| +#include "webrtc/p2p/quic/quictransportchannel.h" |
| +#endif // USE_QUIC |
| + |
| namespace cricket { |
| enum { |
| @@ -219,6 +224,15 @@ Transport* TransportController::CreateTransport_w( |
| const std::string& transport_name) { |
| RTC_DCHECK(worker_thread_->IsCurrent()); |
| +#ifdef USE_QUIC |
| + if (quic_) { |
| + ice_transport_channel_.reset( |
|
Taylor Brandstetter
2016/04/01 23:23:42
If you decide to force "one QUIC channel per PeerC
mikescarlett
2016/04/05 19:58:52
This uses QuicTransport now. QuicTransport owns th
|
| + new P2PTransportChannel(transport_name, 0, port_allocator())); |
| + quic_transport_channel_ = |
| + new QuicTransportChannel(ice_transport_channel_.get()); |
| + return quic_transport_channel_; |
| + } |
| +#endif // USE_QUIC |
| Transport* transport = new DtlsTransport<P2PTransport>( |
| transport_name, port_allocator(), certificate_); |
| return transport; |
| @@ -651,4 +665,19 @@ void TransportController::UpdateAggregateStates_w() { |
| } |
| } |
| +void TransportController::set_quic(bool use_quic) { |
| +#ifdef USE_QUIC |
| + quic_ = use_quic; |
| +#endif // USE_QUIC |
|
pthatcher1
2016/03/30 20:34:50
This doesn't need USE_QUIC, does it?
mikescarlett
2016/04/05 19:58:53
Fixed.
|
| +} |
| + |
| +QuicTransportChannel* TransportController::quic_transport_channel() const { |
| +#ifdef USE_QUIC |
| + if (quic_transport_channel_ != nullptr) { |
| + return quic_transport_channel_; |
| + } |
| +#endif // USE_QUIC |
| + return nullptr; |
|
pthatcher1
2016/03/30 20:34:50
We should probably do an RTC_DCHECK if we don't pu
mikescarlett
2016/04/05 19:58:53
This is behind HAVE_QUIC.
|
| +} |
| + |
| } // namespace cricket |