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

Unified Diff: net/quic/test_tools/quic_connection_peer.cc

Issue 2002083002: Add QuicSentPacketManagerInterface, and QuicSentPacketManager implements it. No functional change e… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/test_tools/quic_sent_packet_manager_peer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_connection_peer.cc
diff --git a/net/quic/test_tools/quic_connection_peer.cc b/net/quic/test_tools/quic_connection_peer.cc
index d5bbac45f426e6c004c26ecc3c98b57b5e12396f..c9a8901b67e02f89902658013a8f40654ffed4ac 100644
--- a/net/quic/test_tools/quic_connection_peer.cc
+++ b/net/quic/test_tools/quic_connection_peer.cc
@@ -24,7 +24,9 @@ void QuicConnectionPeer::SendAck(QuicConnection* connection) {
void QuicConnectionPeer::SetSendAlgorithm(
QuicConnection* connection,
SendAlgorithmInterface* send_algorithm) {
- connection->sent_packet_manager_.send_algorithm_.reset(send_algorithm);
+ // TODO(fayang): Remove this method when there is a MockSentPacketManager.
+ static_cast<QuicSentPacketManager*>(connection->sent_packet_manager_.get())
+ ->send_algorithm_.reset(send_algorithm);
}
// static
@@ -62,7 +64,9 @@ QuicPacketGenerator* QuicConnectionPeer::GetPacketGenerator(
// static
QuicSentPacketManager* QuicConnectionPeer::GetSentPacketManager(
QuicConnection* connection) {
- return &connection->sent_packet_manager_;
+ // TODO(fayang): Remove this method when there is a MockSentPacketManager.
+ return static_cast<QuicSentPacketManager*>(
+ connection->sent_packet_manager_.get());
}
// static
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/test_tools/quic_sent_packet_manager_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698