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

Unified Diff: net/quic/congestion_control/fix_rate_sender.cc

Issue 12806002: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor comment fix Created 7 years, 9 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/congestion_control/fix_rate_sender.h ('k') | net/quic/congestion_control/fix_rate_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/fix_rate_sender.cc
diff --git a/net/quic/congestion_control/fix_rate_sender.cc b/net/quic/congestion_control/fix_rate_sender.cc
index 924a7b4d9b5f09827f0a65d222ba9923a8f9470d..19549a4769c9ee8c371e3ea06db38edfa2300b93 100644
--- a/net/quic/congestion_control/fix_rate_sender.cc
+++ b/net/quic/congestion_control/fix_rate_sender.cc
@@ -20,10 +20,14 @@ FixRateSender::FixRateSender(const QuicClock* clock)
: bitrate_(QuicBandwidth::FromBytesPerSecond(kInitialBitrate)),
fix_rate_leaky_bucket_(bitrate_),
paced_sender_(bitrate_),
- data_in_flight_(0) {
+ data_in_flight_(0),
+ latest_rtt_(QuicTime::Delta::Zero()) {
DLOG(INFO) << "FixRateSender";
}
+FixRateSender::~FixRateSender() {
+}
+
void FixRateSender::OnIncomingQuicCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& feedback,
QuicTime feedback_receive_time,
@@ -42,7 +46,8 @@ void FixRateSender::OnIncomingQuicCongestionFeedbackFrame(
void FixRateSender::OnIncomingAck(
QuicPacketSequenceNumber /*acked_sequence_number*/,
QuicByteCount bytes_acked,
- QuicTime::Delta /*rtt*/) {
+ QuicTime::Delta rtt) {
+ latest_rtt_ = rtt;
data_in_flight_ -= bytes_acked;
}
@@ -53,8 +58,7 @@ void FixRateSender::OnIncomingLoss(QuicTime /*ack_receive_time*/) {
void FixRateSender::SentPacket(QuicTime sent_time,
QuicPacketSequenceNumber /*sequence_number*/,
QuicByteCount bytes,
- bool is_retransmission,
- bool /*has_retransmittable_data*/) {
+ bool is_retransmission) {
fix_rate_leaky_bucket_.Add(sent_time, bytes);
paced_sender_.SentPacket(sent_time, bytes);
if (!is_retransmission) {
@@ -62,8 +66,15 @@ void FixRateSender::SentPacket(QuicTime sent_time,
}
}
-QuicTime::Delta FixRateSender::TimeUntilSend(QuicTime now,
- bool /*is_retransmission*/) {
+void FixRateSender::AbandoningPacket(
+ QuicPacketSequenceNumber /*sequence_number*/,
+ QuicByteCount /*abandoned_bytes*/) {
+}
+
+QuicTime::Delta FixRateSender::TimeUntilSend(
+ QuicTime now,
+ bool /*is_retransmission*/,
+ bool /*has_retransmittable_data*/) {
if (CongestionWindow() > fix_rate_leaky_bucket_.BytesPending(now)) {
if (CongestionWindow() <= data_in_flight_) {
// We need an ack before we send more.
@@ -90,4 +101,9 @@ QuicBandwidth FixRateSender::BandwidthEstimate() {
return bitrate_;
}
+QuicTime::Delta FixRateSender::SmoothedRtt() {
+ // TODO(satyamshekhar): Calculate and return smoothed rtt.
+ return latest_rtt_;
+}
+
} // namespace net
« no previous file with comments | « net/quic/congestion_control/fix_rate_sender.h ('k') | net/quic/congestion_control/fix_rate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698