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

Unified Diff: webrtc/api/peerconnection.cc

Issue 2206793007: Revert of Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | webrtc/api/peerconnection_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index 95cd7ea179f6cc89806610e1dc53aa2514d06506..4ccd6e83adef931dac9d4cc9f1da853024670a6b 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -907,23 +907,6 @@
const std::string& label,
const DataChannelInit* config) {
TRACE_EVENT0("webrtc", "PeerConnection::CreateDataChannel");
-#ifdef HAVE_QUIC
- if (session_->data_channel_type() == cricket::DCT_QUIC) {
- // TODO(zhihuang): Handle case when config is NULL.
- if (!config) {
- LOG(LS_ERROR) << "Missing config for QUIC data channel.";
- return nullptr;
- }
- // TODO(zhihuang): Allow unreliable or ordered QUIC data channels.
- if (!config->reliable || config->ordered) {
- LOG(LS_ERROR) << "QUIC data channel does not implement unreliable or "
- "ordered delivery.";
- return nullptr;
- }
- return session_->quic_data_transport()->CreateDataChannel(label, config);
- }
-#endif // HAVE_QUIC
-
bool first_datachannel = !HasDataChannels();
std::unique_ptr<InternalDataChannelInit> internal_config;
@@ -1635,8 +1618,8 @@
(session_options->has_audio() || session_options->has_video() ||
session_options->has_data());
- if (HasDataChannels()) {
- session_options->data_channel_type = session_->data_channel_type();
+ if (session_->data_channel_type() == cricket::DCT_SCTP && HasDataChannels()) {
+ session_options->data_channel_type = cricket::DCT_SCTP;
}
session_options->rtcp_cname = rtcp_cname_;
@@ -1665,7 +1648,9 @@
// RTP data channel is handled in MediaSessionOptions::AddStream. SCTP streams
// are not signaled in the SDP so does not go through that path and must be
// handled here.
- session_options->data_channel_type = session_->data_channel_type();
+ if (session_->data_channel_type() == cricket::DCT_SCTP) {
+ session_options->data_channel_type = cricket::DCT_SCTP;
+ }
session_options->crypto_options = factory_->options().crypto_options;
}
@@ -2069,13 +2054,7 @@
}
bool PeerConnection::HasDataChannels() const {
-#ifdef HAVE_QUIC
- return !rtp_data_channels_.empty() || !sctp_data_channels_.empty() ||
- (session_->quic_data_transport() &&
- session_->quic_data_transport()->HasDataChannels());
-#else
return !rtp_data_channels_.empty() || !sctp_data_channels_.empty();
-#endif // HAVE_QUIC
}
void PeerConnection::AllocateSctpSids(rtc::SSLRole role) {
« no previous file with comments | « no previous file | webrtc/api/peerconnection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698