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

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

Issue 23597045: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged QuicPriority to RequestPriority changes Created 7 years, 3 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 | Annotate | Revision Log
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/inter_arrival_sender.h" 5 #include "net/quic/congestion_control/inter_arrival_sender.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 namespace { 9 namespace {
10 const int64 kProbeBitrateKBytesPerSecond = 1200; // 9.6 Mbit/s 10 const int64 kProbeBitrateKBytesPerSecond = 1200; // 9.6 Mbit/s
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 if (!probing_) { 228 if (!probing_) {
229 if (!state_machine_->PacketLossEvent()) { 229 if (!state_machine_->PacketLossEvent()) {
230 // Less than one RTT since last PacketLossEvent. 230 // Less than one RTT since last PacketLossEvent.
231 return; 231 return;
232 } 232 }
233 // Calculate new pace rate. 233 // Calculate new pace rate.
234 EstimateBandwidthAfterLossEvent(ack_receive_time); 234 EstimateBandwidthAfterLossEvent(ack_receive_time);
235 } 235 }
236 } 236 }
237 237
238 void InterArrivalSender::SentPacket(QuicTime sent_time, 238 bool InterArrivalSender::SentPacket(
239 QuicPacketSequenceNumber sequence_number, 239 QuicTime sent_time,
240 QuicByteCount bytes, 240 QuicPacketSequenceNumber sequence_number,
241 Retransmission /*retransmit*/) { 241 QuicByteCount bytes,
242 Retransmission /*is_retransmit*/,
243 HasRetransmittableData /*has_retransmittable_data*/) {
242 if (probing_) { 244 if (probing_) {
243 probe_->OnSentPacket(bytes); 245 probe_->OnSentPacket(bytes);
244 } 246 }
245 paced_sender_->SentPacket(sent_time, bytes); 247 paced_sender_->SentPacket(sent_time, bytes);
248 return true;
246 } 249 }
247 250
248 void InterArrivalSender::AbandoningPacket( 251 void InterArrivalSender::AbandoningPacket(
249 QuicPacketSequenceNumber /*sequence_number*/, 252 QuicPacketSequenceNumber /*sequence_number*/,
250 QuicByteCount abandoned_bytes) { 253 QuicByteCount abandoned_bytes) {
251 // TODO(pwestin): use for out outer_congestion_window_ logic. 254 // TODO(pwestin): use for out outer_congestion_window_ logic.
252 if (probing_) { 255 if (probing_) {
253 probe_->OnAcknowledgedPacket(abandoned_bytes); 256 probe_->OnAcknowledgedPacket(abandoned_bytes);
254 } 257 }
255 } 258 }
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 bitrate_ramp_up_->Reset(new_rate, current_bandwidth_, channel_estimate); 499 bitrate_ramp_up_->Reset(new_rate, current_bandwidth_, channel_estimate);
497 if (new_rate != current_bandwidth_) { 500 if (new_rate != current_bandwidth_) {
498 current_bandwidth_ = new_rate; 501 current_bandwidth_ = new_rate;
499 paced_sender_->UpdateBandwidthEstimate(feedback_receive_time, 502 paced_sender_->UpdateBandwidthEstimate(feedback_receive_time,
500 current_bandwidth_); 503 current_bandwidth_);
501 state_machine_->DecreaseBitrateDecision(); 504 state_machine_->DecreaseBitrateDecision();
502 } 505 }
503 } 506 }
504 507
505 } // namespace net 508 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/inter_arrival_sender.h ('k') | net/quic/congestion_control/inter_arrival_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698