Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.

To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has ben modified to use a QuicDataTransport
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used

QuicDataTransport implements the generic functions of
BaseChannel to manage the QuicTransportChannel.

Review-Url: https://codereview.webrtc.org/2166873002
Cr-Commit-Position: refs/heads/master@{#13645}
diff --git a/webrtc/api/webrtcsession_unittest.cc b/webrtc/api/webrtcsession_unittest.cc
index 1aff50f..2234509 100644
--- a/webrtc/api/webrtcsession_unittest.cc
+++ b/webrtc/api/webrtcsession_unittest.cc
@@ -558,6 +558,8 @@
 
     if (session_->data_channel_type() == cricket::DCT_SCTP && data_channel_) {
       session_options->data_channel_type = cricket::DCT_SCTP;
+    } else if (session_->data_channel_type() == cricket::DCT_QUIC) {
+      session_options->data_channel_type = cricket::DCT_QUIC;
     }
 
     if (with_gcm_) {
@@ -575,9 +577,7 @@
         (session_options->has_audio() || session_options->has_video() ||
          session_options->has_data());
 
-    if (session_->data_channel_type() == cricket::DCT_SCTP) {
-      session_options->data_channel_type = cricket::DCT_SCTP;
-    }
+    session_options->data_channel_type = session_->data_channel_type();
 
     if (with_gcm_) {
       session_options->crypto_options.enable_gcm_crypto_suites = true;
@@ -4212,6 +4212,26 @@
   SetLocalDescriptionWithoutError(answer);
 }
 
+#ifdef HAVE_QUIC
+TEST_P(WebRtcSessionTest, TestNegotiateQuic) {
+  configuration_.enable_quic = true;
+  InitWithDtls(GetParam());
+  EXPECT_TRUE(session_->data_channel_type() == cricket::DCT_QUIC);
+  SessionDescriptionInterface* offer = CreateOffer();
+  ASSERT_TRUE(offer);
+  ASSERT_TRUE(offer->description());
+  SetLocalDescriptionWithoutError(offer);
+  cricket::MediaSessionOptions options;
+  options.recv_audio = true;
+  options.recv_video = true;
+  SessionDescriptionInterface* answer =
+      CreateRemoteAnswer(offer, options, cricket::SEC_DISABLED);
+  ASSERT_TRUE(answer);
+  ASSERT_TRUE(answer->description());
+  SetRemoteDescriptionWithoutError(answer);
+}
+#endif  // HAVE_QUIC
+
 // Tests that RTX codec is removed from the answer when it isn't supported
 // by local side.
 TEST_F(WebRtcSessionTest, TestRtxRemovedByCreateAnswer) {