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

Unified Diff: net/quic/quic_unacked_packet_map.h

Issue 523813003: Revert of Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 293c7b6a16586adf715e9addec43ad505a45eafa..3c367f6e670c61892f5c9fc6270bf8f7de24df44 100644
--- a/net/quic/quic_unacked_packet_map.h
+++ b/net/quic/quic_unacked_packet_map.h
@@ -5,8 +5,7 @@
#ifndef NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_
#define NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_
-#include <deque>
-
+#include "net/base/linked_hash_map.h"
#include "net/quic/quic_protocol.h"
namespace net {
@@ -72,7 +71,7 @@
// Returns the smallest sequence number of a serialized packet which has not
// been acked by the peer. If there are no unacked packets, returns 0.
- QuicPacketSequenceNumber GetLeastUnacked() const;
+ QuicPacketSequenceNumber GetLeastUnackedSentPacket() const;
// Sets a packet as sent with the sent time |sent_time|. Marks the packet
// as in flight if |set_in_flight| is true.
@@ -90,7 +89,8 @@
// in the ack frame for new acks.
void ClearPreviousRetransmissions(size_t num_to_clear);
- typedef std::deque<TransmissionInfo> UnackedPacketMap;
+ typedef linked_hash_map<QuicPacketSequenceNumber,
+ TransmissionInfo> UnackedPacketMap;
typedef UnackedPacketMap::const_iterator const_iterator;
@@ -112,7 +112,7 @@
QuicTime GetFirstInFlightPacketSentTime() const;
// Returns the number of unacked packets.
- size_t GetNumUnackedPacketsDebugOnly() const;
+ size_t GetNumUnackedPackets() const;
// Returns true if there are multiple packets in flight.
bool HasMultipleInFlightPackets() const;
@@ -129,16 +129,11 @@
// |largest_acked_packet| are discarded if they are only for the RTT purposes.
void IncreaseLargestObserved(QuicPacketSequenceNumber largest_observed);
- // Remove any packets no longer needed for retransmission, congestion, or
- // RTT measurement purposes.
- void RemoveObsoletePackets();
-
private:
void MaybeRemoveRetransmittableFrames(TransmissionInfo* transmission_info);
// Returns true if the packet no longer has a purpose in the map.
- bool IsPacketUseless(QuicPacketSequenceNumber sequence_number,
- const TransmissionInfo& info) const;
+ bool IsPacketUseless(UnackedPacketMap::const_iterator it) const;
QuicPacketSequenceNumber largest_sent_packet_;
QuicPacketSequenceNumber largest_observed_;
@@ -152,8 +147,6 @@
// be removed from the map and the new entry's retransmittable frames will be
// set to NULL.
UnackedPacketMap unacked_packets_;
- // The packet at the 0th index of unacked_packets_.
- QuicPacketSequenceNumber least_unacked_;
size_t bytes_in_flight_;
// Number of retransmittable crypto handshake packets.
« 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