Chromium Code Reviews| Index: webrtc/p2p/base/faketransportcontroller.h |
| diff --git a/webrtc/p2p/base/faketransportcontroller.h b/webrtc/p2p/base/faketransportcontroller.h |
| index b8c67ecd17aacaab29e459ed264ed6afb3508b54..9d8f07aa3d28e74579338b571fefe9d7a91648fa 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_ = |
|
Taylor Brandstetter
2016/08/02 23:55:32
nit: Since this is a local variable it shouldn't h
|
| + 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); |
| } |