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

Side by Side Diff: net/quic/congestion_control/pacing_sender.cc

Issue 1708223004: relnote: Call QUIC's underlying SendAlgorithm's PacingRate() directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@114465990
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/congestion_control/pacing_sender.h" 5 #include "net/quic/congestion_control/pacing_sender.h"
6 6
7 using std::min; 7 using std::min;
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 if (burst_tokens_ > 0) { 73 if (burst_tokens_ > 0) {
74 --burst_tokens_; 74 --burst_tokens_;
75 was_last_send_delayed_ = false; 75 was_last_send_delayed_ = false;
76 last_delayed_packet_sent_time_ = QuicTime::Zero(); 76 last_delayed_packet_sent_time_ = QuicTime::Zero();
77 ideal_next_packet_send_time_ = QuicTime::Zero(); 77 ideal_next_packet_send_time_ = QuicTime::Zero();
78 return in_flight; 78 return in_flight;
79 } 79 }
80 // The next packet should be sent as soon as the current packets has been 80 // The next packet should be sent as soon as the current packets has been
81 // transferred. 81 // transferred.
82 QuicTime::Delta delay = PacingRate().TransferTime(bytes); 82 QuicTime::Delta delay = sender_->PacingRate().TransferTime(bytes);
83 // If the last send was delayed, and the alarm took a long time to get 83 // If the last send was delayed, and the alarm took a long time to get
84 // invoked, allow the connection to make up for lost time. 84 // invoked, allow the connection to make up for lost time.
85 if (was_last_send_delayed_) { 85 if (was_last_send_delayed_) {
86 ideal_next_packet_send_time_ = ideal_next_packet_send_time_.Add(delay); 86 ideal_next_packet_send_time_ = ideal_next_packet_send_time_.Add(delay);
87 // The send was application limited if it takes longer than the 87 // The send was application limited if it takes longer than the
88 // pacing delay between sent packets. 88 // pacing delay between sent packets.
89 const bool application_limited = 89 const bool application_limited =
90 last_delayed_packet_sent_time_.IsInitialized() && 90 last_delayed_packet_sent_time_.IsInitialized() &&
91 sent_time > last_delayed_packet_sent_time_.Add(delay); 91 sent_time > last_delayed_packet_sent_time_.Add(delay);
92 const bool making_up_for_lost_time = 92 const bool making_up_for_lost_time =
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 QuicByteCount PacingSender::GetSlowStartThreshold() const { 177 QuicByteCount PacingSender::GetSlowStartThreshold() const {
178 return sender_->GetSlowStartThreshold(); 178 return sender_->GetSlowStartThreshold();
179 } 179 }
180 180
181 CongestionControlType PacingSender::GetCongestionControlType() const { 181 CongestionControlType PacingSender::GetCongestionControlType() const {
182 return sender_->GetCongestionControlType(); 182 return sender_->GetCongestionControlType();
183 } 183 }
184 184
185 } // namespace net 185 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698