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

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

Issue 1658373002: Move QuicPacketCreator::SerializeAllFrames into QuicPacketCreatorPeer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0202
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/test_tools/quic_packet_creator_peer.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_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();
}
« no previous file with comments | « net/quic/test_tools/quic_packet_creator_peer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698