Index: net/quic/test_tools/quic_packet_creator_peer.cc |
diff --git a/net/quic/test_tools/quic_packet_creator_peer.cc b/net/quic/test_tools/quic_packet_creator_peer.cc |
index 531235c2e8ba68fca2feba062e41f746c910d610..c1b34d66ef6aa376a118221e2033336d648f6498 100644 |
--- a/net/quic/test_tools/quic_packet_creator_peer.cc |
+++ b/net/quic/test_tools/quic_packet_creator_peer.cc |
@@ -112,6 +112,23 @@ SerializedPacket QuicPacketCreatorPeer::SerializeFec(QuicPacketCreator* creator, |
} |
// static |
+SerializedPacket QuicPacketCreatorPeer::SerializeAllFrames( |
+ QuicPacketCreator* creator, |
+ const QuicFrames& frames, |
+ char* buffer, |
+ size_t buffer_len) { |
+ DCHECK(creator->queued_frames_.empty()); |
+ DCHECK(!frames.empty()); |
+ for (const QuicFrame& frame : frames) { |
+ bool success = creator->AddFrame(frame, false); |
+ DCHECK(success); |
+ } |
+ SerializedPacket packet = creator->SerializePacket(buffer, buffer_len); |
+ DCHECK(packet.retransmittable_frames == nullptr); |
+ return packet; |
+} |
+ |
+// static |
void QuicPacketCreatorPeer::ResetFecGroup(QuicPacketCreator* creator) { |
creator->ResetFecGroup(); |
} |