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

Unified Diff: net/quic/quic_unacked_packet_map.h

Issue 640853005: Simplify QuicUnackedPacketMap to expose AddSentPacket, instead of (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Making_whole_host_of_QUIC_framing_errors_77961885
Patch Set: Created 6 years, 2 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_sent_packet_manager_test.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_unacked_packet_map.h
diff --git a/net/quic/quic_unacked_packet_map.h b/net/quic/quic_unacked_packet_map.h
index 9806ffc12d159b67537286d0e1a30293079596f6..6e437fb6a6a734cf846e95f305ab9be8b8e60904 100644
--- a/net/quic/quic_unacked_packet_map.h
+++ b/net/quic/quic_unacked_packet_map.h
@@ -20,16 +20,18 @@ class NET_EXPORT_PRIVATE QuicUnackedPacketMap {
QuicUnackedPacketMap();
~QuicUnackedPacketMap();
- // Adds |serialized_packet| to the map. Does not mark it in flight.
- void AddPacket(const SerializedPacket& serialized_packet);
-
- // Called when a packet is retransmitted with a new sequence number.
- // |old_sequence_number| will remain unacked, but will have no
- // retransmittable data associated with it. |new_sequence_number| will
- // be both unacked and associated with retransmittable data.
- void OnRetransmittedPacket(QuicPacketSequenceNumber old_sequence_number,
- QuicPacketSequenceNumber new_sequence_number,
- TransmissionType transmission_type);
+ // Adds |serialized_packet| to the map and marks it as sent at |sent_time|.
+ // Marks the packet as in flight if |set_in_flight| is true.
+ // Packets marked as in flight are expected to be marked as missing when they
+ // don't arrive, indicating the need for retransmission.
+ // |old_sequence_number| is the sequence number of the previous transmission,
+ // or 0 if there was none.
+ void AddSentPacket(const SerializedPacket& serialized_packet,
+ QuicPacketSequenceNumber old_sequence_number,
+ TransmissionType transmission_type,
+ QuicTime sent_time,
+ QuicByteCount bytes_sent,
+ bool set_in_flight);
// Returns true if the packet |sequence_number| is unacked.
bool IsUnacked(QuicPacketSequenceNumber sequence_number) const;
@@ -74,15 +76,6 @@ class NET_EXPORT_PRIVATE QuicUnackedPacketMap {
// been acked by the peer. If there are no unacked packets, returns 0.
QuicPacketSequenceNumber GetLeastUnacked() const;
- // Sets a packet as sent with the sent time |sent_time|. Marks the packet
- // as in flight if |set_in_flight| is true.
- // Packets marked as in flight are expected to be marked as missing when they
- // don't arrive, indicating the need for retransmission.
- void SetSent(QuicPacketSequenceNumber sequence_number,
- QuicTime sent_time,
- QuicByteCount bytes_sent,
- bool set_in_flight);
-
// Restores the in flight status for a packet that was previously sent.
void RestoreInFlight(QuicPacketSequenceNumber sequence_number);
@@ -137,6 +130,15 @@ class NET_EXPORT_PRIVATE QuicUnackedPacketMap {
void RemoveObsoletePackets();
private:
+ // Called when a packet is retransmitted with a new sequence number.
+ // |old_sequence_number| will remain unacked, but will have no
+ // retransmittable data associated with it. A transmission info will be
+ // created for |new_sequence_number| and returned.
+ TransmissionInfo OnRetransmittedPacket(
+ QuicPacketSequenceNumber old_sequence_number,
+ QuicPacketSequenceNumber new_sequence_number,
+ TransmissionType transmission_type);
+
void MaybeRemoveRetransmittableFrames(TransmissionInfo* transmission_info);
// Returns true if the packet no longer has a purpose in the map.
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698