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

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

Issue 566743003: Call QuicSentPacketManager's OnPacketSerialized or OnRetransmittedPacket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@initializing_next_stream_id_75335114
Patch Set: Created 6 years, 3 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/test_tools/quic_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.cc
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 4f9c029e35c2eb496d9697f5c115f722a16d318b..98bde10690806c0735786ccb1ff2d17bf697f32b 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -302,14 +302,16 @@ PacketSavingConnection::~PacketSavingConnection() {
STLDeleteElements(&encrypted_packets_);
}
-void PacketSavingConnection::SendOrQueuePacket(
- EncryptionLevel level,
- const SerializedPacket& packet,
- TransmissionType transmission_type) {
- packets_.push_back(packet.packet);
+void PacketSavingConnection::SendOrQueuePacket(QueuedPacket packet) {
+ packets_.push_back(packet.serialized_packet.packet);
QuicEncryptedPacket* encrypted = QuicConnectionPeer::GetFramer(this)->
- EncryptPacket(level, packet.sequence_number, *packet.packet);
+ EncryptPacket(packet.encryption_level,
+ packet.serialized_packet.sequence_number,
+ *packet.serialized_packet.packet);
encrypted_packets_.push_back(encrypted);
+ // Transfer ownership of the packet to the SentPacketManager and the
+ // ack notifier to the AckNotifierManager.
+ sent_packet_manager_.OnSerializedPacket(packet.serialized_packet);
}
MockSession::MockSession(QuicConnection* connection)
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698