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

Unified Diff: net/quic/quic_unacked_packet_map.h

Issue 306573002: Add an IncreaseLargestObserved to QuicUnackedPacketMap to remove the rtt (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 610639c68d865488cedf94ceff8c24f73b0261cf..ec3480a502b4d2e5e8f6816aa25db8069014647b 100644
--- a/net/quic/quic_unacked_packet_map.h
+++ b/net/quic/quic_unacked_packet_map.h
@@ -111,29 +111,23 @@ class NET_EXPORT_PRIVATE QuicUnackedPacketMap {
bool HasPendingCryptoPackets() const;
// Removes any retransmittable frames from this transmission or an associated
- // transmission. It removes any nnon-pending transmissions less than or
- // equal to |largest_observed|, and disconnects any other packets from other
- // transmissions.
- // TODO(ianswett): Remove largest_observed_ once the map tracks whether a
- // transmission is useful for RTT purposes internally.
- void RemoveRetransmittability(QuicPacketSequenceNumber sequence_number,
- QuicPacketSequenceNumber largest_observed_);
-
- // Removes an entry from the unacked packet map which is not pending, has
- // no retransmittable frames, and no associated transmissions.
- // TODO(ianswett): Remove or make this method private once the map tracks
- // the three reasons for tracking a packet correctly.
- void RemoveRttOnlyPacket(QuicPacketSequenceNumber sequence_number);
-
- // Returns true if the packet's only purpose is to measure RTT. It must not
- // be pending, have retransmittable frames, or be linked to transmissions
- // with retransmittable frames.
- static bool IsForRttOnly(const TransmissionInfo& transmission_info);
+
+ // transmission. It removes now useless transmissions, and disconnects any
+ // other packets from other transmissions.
+ void RemoveRetransmittability(QuicPacketSequenceNumber sequence_number);
+
+ // Increases the largest observed. Any packets less or equal to
+ // |largest_acked_packet| are discarded if they are only for the RTT purposes.
+ void IncreaseLargestObserved(QuicPacketSequenceNumber largest_observed);
private:
void MaybeRemoveRetransmittableFrames(TransmissionInfo* transmission_info);
+ // Returns true if the packet no longer has a purpose in the map.
+ bool IsPacketUseless(UnackedPacketMap::const_iterator it);
+
QuicPacketSequenceNumber largest_sent_packet_;
+ QuicPacketSequenceNumber largest_observed_;
// Newly serialized retransmittable and fec packets are added to this map,
// which contains owning pointers to any contained frames. If a packet is
« 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