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

Unified Diff: net/quic/quic_packet_generator.h

Issue 20227003: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Land Recent QUIC changes Created 7 years, 5 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_packet_entropy_manager_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.h
diff --git a/net/quic/quic_packet_generator.h b/net/quic/quic_packet_generator.h
index f47a540194aca5e24fd1167df87b1d8ee28818c6..ab0dbe29b03a38752dca5d22311051060b81b89e 100644
--- a/net/quic/quic_packet_generator.h
+++ b/net/quic/quic_packet_generator.h
@@ -108,7 +108,13 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
private:
void SendQueuedFrames();
+ // Test to see if we have pending ack, feedback, or control frames.
bool HasPendingFrames() const;
+ // Test to see if the addition of a pending frame (which might be
+ // retransmittable) would still allow the resulting packet to be sent now.
+ bool CanSendWithNextPendingFrameAddition() const;
+ // Add exactly one pending frame, preferring ack over feedback over control
+ // frames.
bool AddNextPendingFrame();
bool AddFrame(const QuicFrame& frame);
@@ -120,10 +126,15 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
QuicPacketCreator* packet_creator_;
QuicFrames queued_control_frames_;
bool should_flush_;
+ // Flags to indicate the need for just-in-time construction of a frame.
bool should_send_ack_;
+ bool should_send_feedback_;
+ // If we put a non-retransmittable frame (namley ack or feedback frame) in
+ // this packet, then we have to hold a reference to it until we flush (and
+ // serialize it). Retransmittable frames are referenced elsewhere so that they
+ // can later be (optionally) retransmitted.
scoped_ptr<QuicAckFrame> pending_ack_frame_;
scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_;
- bool should_send_feedback_;
DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
};
« no previous file with comments | « net/quic/quic_packet_entropy_manager_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698