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

Unified Diff: net/quic/quic_packet_creator.cc

Issue 1464153002: Add ConsumeData method to QuicPacketCreator, ConsumeData wraps both CreateStreamFrame and AddFrame.… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107699435
Patch Set: Created 5 years, 1 month 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_packet_creator.h ('k') | net/quic/quic_packet_creator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_creator.cc
diff --git a/net/quic/quic_packet_creator.cc b/net/quic/quic_packet_creator.cc
index c2a400b6c9c86a2c175096bf595b41aeec093f45..c4b57a670b3b894a4d5724e589549043c03eadb0 100644
--- a/net/quic/quic_packet_creator.cc
+++ b/net/quic/quic_packet_creator.cc
@@ -237,6 +237,22 @@ void QuicPacketCreator::UpdatePacketNumberLength(
QuicFramer::GetMinSequenceNumberLength(delta * 4);
}
+bool QuicPacketCreator::ConsumeData(QuicStreamId id,
+ QuicIOVector iov,
+ size_t iov_offset,
+ QuicStreamOffset offset,
+ bool fin,
+ bool needs_padding,
+ QuicFrame* frame) {
+ UniqueStreamBuffer buffer;
+ CreateStreamFrame(id, iov, iov_offset, offset, fin, frame, &buffer);
+
+ return AddFrame(*frame,
+ /*save_retransmittable_frames=*/true,
+ needs_padding,
+ std::move(buffer));
+}
+
bool QuicPacketCreator::HasRoomForStreamFrame(QuicStreamId id,
QuicStreamOffset offset) const {
// TODO(jri): This is a simple safe decision for now, but make
« no previous file with comments | « net/quic/quic_packet_creator.h ('k') | net/quic/quic_packet_creator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698