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

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

Issue 559373003: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compiler errors 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') | net/tools/quic/end_to_end_test.cc » ('j') | 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 cb08f7e22f838a91e06e20d5b3d6d511dc768dd3..98bde10690806c0735786ccb1ff2d17bf697f32b 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -302,15 +302,16 @@ PacketSavingConnection::~PacketSavingConnection() {
STLDeleteElements(&encrypted_packets_);
}
-bool 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);
- return true;
+ // 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') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698