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

Unified Diff: webrtc/p2p/base/faketransportcontroller.h

Issue 2166873002: Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change the comments and minor fix. 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 | « webrtc/media/base/mediaengine.h ('k') | webrtc/p2p/quic/quictransportchannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/faketransportcontroller.h
diff --git a/webrtc/p2p/base/faketransportcontroller.h b/webrtc/p2p/base/faketransportcontroller.h
index b8c67ecd17aacaab29e459ed264ed6afb3508b54..c15e164f41eed0f5915c849383d7dce2374e8ea4 100644
--- a/webrtc/p2p/base/faketransportcontroller.h
+++ b/webrtc/p2p/base/faketransportcontroller.h
@@ -29,6 +29,10 @@
#include "webrtc/base/sslfingerprint.h"
#include "webrtc/base/thread.h"
+#ifdef HAVE_QUIC
+#include "webrtc/p2p/quic/quictransport.h"
+#endif
+
namespace cricket {
class FakeTransport;
@@ -453,6 +457,21 @@ class FakeTransport : public Transport {
rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12;
};
+#ifdef HAVE_QUIC
+class FakeQuicTransport : public QuicTransport {
+ public:
+ FakeQuicTransport(const std::string& transport_name)
+ : QuicTransport(transport_name, nullptr, nullptr) {}
+
+ protected:
+ QuicTransportChannel* CreateTransportChannel(int component) override {
+ FakeTransportChannel* fake_ice_transport_channel =
+ new FakeTransportChannel(name(), component);
+ return new QuicTransportChannel(fake_ice_transport_channel);
+ }
+};
+#endif
+
// Fake candidate pair class, which can be passed to BaseChannel for testing
// purposes.
class FakeCandidatePair : public CandidatePairInterface {
@@ -541,6 +560,11 @@ class FakeTransportController : public TransportController {
protected:
Transport* CreateTransport_n(const std::string& transport_name) override {
+#ifdef HAVE_QUIC
+ if (quic()) {
+ return new FakeQuicTransport(transport_name);
+ }
+#endif
return new FakeTransport(transport_name);
}
« no previous file with comments | « webrtc/media/base/mediaengine.h ('k') | webrtc/p2p/quic/quictransportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698