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

Unified Diff: webrtc/api/peerconnection.cc

Issue 1844803002: Modify PeerConnection for end-to-end QuicDataChannel usage (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months 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: webrtc/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index b2b8062ca843a00015851e2f9a735d53e13fee0f..baa2376f31e13a2a7af51ead7394cfbc76bbc9fa 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -833,6 +833,25 @@ PeerConnection::CreateDataChannel(
const std::string& label,
const DataChannelInit* config) {
TRACE_EVENT0("webrtc", "PeerConnection::CreateDataChannel");
+#ifdef USE_QUIC
+ // TODO(mikescarlett): Handle case when CreateDataChannel() is called
+ // before QUIC is specified in the session description.
Taylor Brandstetter 2016/04/01 23:23:41 Can't "use quic" be a parameter in RTCConfiguratio
mikescarlett 2016/04/05 19:58:49 This seems necessary since QUIC won't be negotiate
+ if (session_->data_channel_type() == cricket::DCT_QUIC) {
+ cricket::QuicTransportChannel* quic_transport_channel =
+ session_->quic_transport_channel();
+ RTC_DCHECK(quic_transport_channel != nullptr);
Taylor Brandstetter 2016/04/01 23:23:41 It should be possible to create a data channel eve
mikescarlett 2016/04/05 19:58:48 Fixed.
+ rtc::scoped_refptr<QuicDataChannel> channel(new QuicDataChannel(
+ quic_transport_channel, session_->signaling_thread(),
+ session_->worker_thread(), label, config));
+ quic_data_channels_.push_back(channel);
+ if (!quic_transport_) {
+ quic_transport_.reset(new QuicTransport(quic_transport_channel));
+ }
pthatcher1 2016/03/30 20:34:47 It seems like this should logically go a few lines
+ quic_transport_->RegisterDataChannel(channel);
+ return channel;
+ }
+#endif // USE_QUIC
+
bool first_datachannel = !HasDataChannels();
rtc::scoped_ptr<InternalDataChannelInit> internal_config;

Powered by Google App Engine
This is Rietveld 408576698