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

Unified Diff: net/quic/quic_unacked_packet_map.cc

Issue 282323003: Minor cleanup of QuicUnackedPacketMap to simplify the implementation of (Closed) Base URL: https://chromium.googlesource.com/chromium/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_unacked_packet_map.h ('k') | net/quic/test_tools/quic_sent_packet_manager_peer.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.cc
diff --git a/net/quic/quic_unacked_packet_map.cc b/net/quic/quic_unacked_packet_map.cc
index c6f09c682cbe86f88c8c907bbb73721eb0b77098..a8fe3b5eb44145f766d6cbda0b92a510e3a4ca2d 100644
--- a/net/quic/quic_unacked_packet_map.cc
+++ b/net/quic/quic_unacked_packet_map.cc
@@ -198,13 +198,7 @@ bool QuicUnackedPacketMap::HasUnackedPackets() const {
}
bool QuicUnackedPacketMap::HasPendingPackets() const {
- for (UnackedPacketMap::const_reverse_iterator it =
- unacked_packets_.rbegin(); it != unacked_packets_.rend(); ++it) {
- if (it->second.pending) {
- return true;
- }
- }
- return false;
+ return bytes_in_flight_ > 0;
}
const TransmissionInfo& QuicUnackedPacketMap::GetTransmissionInfo(
@@ -271,17 +265,6 @@ bool QuicUnackedPacketMap::HasUnackedRetransmittableFrames() const {
return false;
}
-size_t QuicUnackedPacketMap::GetNumRetransmittablePackets() const {
- size_t num_unacked_packets = 0;
- for (UnackedPacketMap::const_iterator it = unacked_packets_.begin();
- it != unacked_packets_.end(); ++it) {
- if (it->second.retransmittable_frames != NULL) {
- ++num_unacked_packets;
- }
- }
- return num_unacked_packets;
-}
-
QuicPacketSequenceNumber
QuicUnackedPacketMap::GetLeastUnackedSentPacket() const {
if (unacked_packets_.empty()) {
« no previous file with comments | « net/quic/quic_unacked_packet_map.h ('k') | net/quic/test_tools/quic_sent_packet_manager_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698