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

Unified Diff: net/quic/quic_packet_generator.h

Issue 876313009: Keep an instance of QuicAckFrame in QuicConnection in order to reduce (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Fix_compile_errors_85182632
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_connection_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..25b2cc683506dab15c4ec846f60dfe83e8a0078c 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;
@@ -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_connection_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698