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

Unified Diff: net/quic/quic_sent_packet_manager.h

Issue 497553004: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase with TOT 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_entropy_manager_test.cc ('k') | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager.h
diff --git a/net/quic/quic_sent_packet_manager.h b/net/quic/quic_sent_packet_manager.h
index 2e3c05d34134dc4c80320f36b2dd719f41971b69..342dd3d4653144005b9ad3ae86db254a8ba58c10 100644
--- a/net/quic/quic_sent_packet_manager.h
+++ b/net/quic/quic_sent_packet_manager.h
@@ -21,6 +21,7 @@
#include "net/quic/congestion_control/send_algorithm_interface.h"
#include "net/quic/quic_ack_notifier_manager.h"
#include "net/quic/quic_protocol.h"
+#include "net/quic/quic_sustained_bandwidth_recorder.h"
#include "net/quic/quic_unacked_packet_map.h"
namespace net {
@@ -197,9 +198,11 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
// Returns the estimated bandwidth calculated by the congestion algorithm.
QuicBandwidth BandwidthEstimate() const;
- // Returns true if the current bandwidth estimate is reliable.
+ // Returns true if the current instantaneous bandwidth estimate is reliable.
bool HasReliableBandwidthEstimate() const;
+ const QuicSustainedBandwidthRecorder& SustainedBandwidthRecorder() const;
+
// Returns the size of the current congestion window in bytes. Note, this is
// not the *available* window. Some send algorithms may not use a congestion
// window and will return 0.
@@ -220,7 +223,11 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
}
QuicPacketSequenceNumber largest_observed() const {
- return largest_observed_;
+ return unacked_packets_.largest_observed();
+ }
+
+ QuicPacketSequenceNumber least_packet_awaited_by_peer() {
+ return least_packet_awaited_by_peer_;
}
void set_network_change_visitor(NetworkChangeVisitor* visitor) {
@@ -258,6 +265,9 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
typedef linked_hash_map<QuicPacketSequenceNumber,
TransmissionType> PendingRetransmissionMap;
+ // Updates the least_packet_awaited_by_peer.
+ void UpdatePacketInformationReceivedByPeer(const QuicAckFrame& ack_frame);
+
// Process the incoming ack looking for newly ack'd data packets.
void HandleAckForSentPackets(const QuicAckFrame& ack_frame);
@@ -348,9 +358,8 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
scoped_ptr<SendAlgorithmInterface> send_algorithm_;
scoped_ptr<LossDetectionInterface> loss_algorithm_;
- // The largest sequence number which we have sent and received an ACK for
- // from the peer.
- QuicPacketSequenceNumber largest_observed_;
+ // Least sequence number which the peer is still waiting for.
+ QuicPacketSequenceNumber least_packet_awaited_by_peer_;
// Tracks the first RTO packet. If any packet before that packet gets acked,
// it indicates the RTO was spurious and should be reversed(F-RTO).
@@ -377,6 +386,10 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
// retransmittable frames.
bool handshake_confirmed_;
+ // Records bandwidth from server to client in normal operation, over periods
+ // of time with no loss events.
+ QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_;
+
DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager);
};
« no previous file with comments | « net/quic/quic_sent_entropy_manager_test.cc ('k') | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698