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

Unified Diff: net/quic/quic_connection_test.cc

Issue 1666553002: Make QUIC's SerializedPacket contain QuicFrames, rather than a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113205205
Patch Set: Created 4 years, 11 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_connection.cc ('k') | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_test.cc
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index 2b68fb4f78750ccaad5e2d7820449aa1841de189..f06b103d1395f2043bd806199d3fd3f868db1b4d 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -458,9 +458,6 @@ class TestConnection : public QuicConnection {
HasRetransmittableData retransmittable,
bool has_ack,
bool has_pending_frames) {
- QuicFrames* retransmittable_frames =
- retransmittable == HAS_RETRANSMITTABLE_DATA ? new QuicFrames()
- : nullptr;
char buffer[kMaxPacketSize];
size_t encrypted_length =
QuicConnectionPeer::GetFramer(this)->EncryptPayload(
@@ -470,7 +467,11 @@ class TestConnection : public QuicConnection {
SerializedPacket serialized_packet(
kDefaultPathId, packet_number, PACKET_6BYTE_PACKET_NUMBER,
new QuicEncryptedPacket(buffer, encrypted_length, false), entropy_hash,
- retransmittable_frames, has_ack, has_pending_frames);
+ has_ack, has_pending_frames);
+ if (retransmittable == HAS_RETRANSMITTABLE_DATA) {
+ serialized_packet.retransmittable_frames.push_back(
+ QuicFrame(new QuicStreamFrame()));
+ }
OnSerializedPacket(&serialized_packet);
}
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698