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

Unified Diff: webrtc/p2p/base/p2ptransportchannel_unittest.cc

Issue 2416023002: Introduce rtc::PacketTransportInterface and let cricket::TransportChannel inherit. (Closed)
Patch Set: Resolve unused variable issue in release build. Created 4 years, 2 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/p2p/base/p2ptransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel_unittest.cc b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
index 7e65b4baba93d22a4cac78b71b31705229006f04..2c1013366aef5a31381db5f597f8e97a47aef8f8 100644
--- a/webrtc/p2p/base/p2ptransportchannel_unittest.cc
+++ b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
@@ -13,6 +13,7 @@
#include "webrtc/api/fakemetricsobserver.h"
#include "webrtc/p2p/base/fakeportallocator.h"
+#include "webrtc/p2p/base/packettransport.h"
#include "webrtc/p2p/base/p2ptransportchannel.h"
#include "webrtc/p2p/base/testrelayserver.h"
#include "webrtc/p2p/base/teststunserver.h"
@@ -670,8 +671,8 @@ class P2PTransportChannelTestBase : public testing::Test,
TestSendRecv();
}
- void OnReadyToSend(TransportChannel* ch) {
- GetEndpoint(ch)->ready_to_send_ = true;
+ void OnReadyToSend(rtc::PacketTransport* pt) {
+ GetEndpoint(static_cast<TransportChannel*>(pt))->ready_to_send_ = true;
}
// We pass the candidates directly to the other side.
@@ -777,12 +778,13 @@ class P2PTransportChannelTestBase : public testing::Test,
}
}
}
- void OnReadPacket(TransportChannel* channel,
+ void OnReadPacket(rtc::PacketTransport* pt,
const char* data,
size_t len,
const rtc::PacketTime& packet_time,
int flags) {
- std::list<std::string>& packets = GetPacketList(channel);
+ std::list<std::string>& packets =
+ GetPacketList(static_cast<TransportChannel*>(pt));
packets.push_front(std::string(data, len));
}
void OnRoleConflict(TransportChannelImpl* channel) {
@@ -2909,7 +2911,7 @@ class P2PTransportChannelPingTest : public testing::Test,
conn->OnReadPacket(buf.Data(), buf.Length(), rtc::CreatePacketTime(0));
}
- void OnReadyToSend(TransportChannel* channel) {
+ void OnReadyToSend(rtc::PacketTransport* pt) {
channel_ready_to_send_ = true;
}
void OnChannelStateChanged(TransportChannelImpl* channel) {

Powered by Google App Engine
This is Rietveld 408576698