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

Unified Diff: net/quic/quic_packet_generator.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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_creator_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 0da94f062ea22393adbb42adbd40b65b17173753..b1658440ba70502b92e7c61e7d6e0edbb40f4b6f 100644
--- a/net/quic/quic_packet_generator.h
+++ b/net/quic/quic_packet_generator.h
@@ -75,8 +75,9 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
virtual bool ShouldGeneratePacket(TransmissionType transmission_type,
HasRetransmittableData retransmittable,
IsHandshake handshake) = 0;
- virtual QuicAckFrame* CreateAckFrame() = 0;
- virtual QuicStopWaitingFrame* CreateStopWaitingFrame() = 0;
+ virtual void PopulateAckFrame(QuicAckFrame* ack) = 0;
+ virtual void PopulateStopWaitingFrame(
+ QuicStopWaitingFrame* stop_waiting) = 0;
// Takes ownership of |packet.packet| and |packet.retransmittable_frames|.
virtual void OnSerializedPacket(const SerializedPacket& packet) = 0;
virtual void CloseConnection(QuicErrorCode error, bool from_peer) = 0;
@@ -158,7 +159,7 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
// Caller must ensure that any open FEC group is closed before calling this
// method.
SerializedPacket ReserializeAllFrames(
- const QuicFrames& frames,
+ const RetransmittableFrames& frames,
QuicSequenceNumberLength original_length);
// Update the sequence number length to use in future packets as soon as it
@@ -254,8 +255,12 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
// 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<QuicStopWaitingFrame> pending_stop_waiting_frame_;
+ QuicAckFrame pending_ack_frame_;
+ QuicStopWaitingFrame pending_stop_waiting_frame_;
+ // True if an ack or stop waiting frame is already queued, and should not be
+ // re-added.
+ bool ack_queued_;
+ bool stop_waiting_queued_;
// Stores notifiers that should be attached to the next serialized packet.
std::list<QuicAckNotifier*> ack_notifiers_;
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698