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

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

Issue 125253004: Simplify RTO interaction between the QUIC sent packet manager and the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/pacing_sender.h" 5 #include "net/quic/congestion_control/pacing_sender.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 PacingSender::PacingSender(SendAlgorithmInterface* sender, 9 PacingSender::PacingSender(SendAlgorithmInterface* sender,
10 QuicTime::Delta alarm_granularity) 10 QuicTime::Delta alarm_granularity)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // a bottleneck. 60 // a bottleneck.
61 const float kPacingAggression = 2; 61 const float kPacingAggression = 2;
62 QuicTime::Delta delay = 62 QuicTime::Delta delay =
63 BandwidthEstimate().Scale(kPacingAggression).TransferTime(bytes); 63 BandwidthEstimate().Scale(kPacingAggression).TransferTime(bytes);
64 next_packet_send_time_ = next_packet_send_time_.Add(delay); 64 next_packet_send_time_ = next_packet_send_time_.Add(delay);
65 } 65 }
66 return sender_->OnPacketSent(sent_time, sequence_number, bytes, 66 return sender_->OnPacketSent(sent_time, sequence_number, bytes,
67 transmission_type, has_retransmittable_data); 67 transmission_type, has_retransmittable_data);
68 } 68 }
69 69
70 void PacingSender::OnRetransmissionTimeout() { 70 void PacingSender::OnRetransmissionTimeout(bool packets_retransmitted) {
71 sender_->OnRetransmissionTimeout(); 71 sender_->OnRetransmissionTimeout(packets_retransmitted);
72 } 72 }
73 73
74 void PacingSender::OnPacketAbandoned(QuicPacketSequenceNumber sequence_number, 74 void PacingSender::OnPacketAbandoned(QuicPacketSequenceNumber sequence_number,
75 QuicByteCount abandoned_bytes) { 75 QuicByteCount abandoned_bytes) {
76 sender_->OnPacketAbandoned(sequence_number, abandoned_bytes); 76 sender_->OnPacketAbandoned(sequence_number, abandoned_bytes);
77 } 77 }
78 78
79 QuicTime::Delta PacingSender::TimeUntilSend( 79 QuicTime::Delta PacingSender::TimeUntilSend(
80 QuicTime now, 80 QuicTime now,
81 TransmissionType transmission_type, 81 TransmissionType transmission_type,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 QuicTime::Delta PacingSender::RetransmissionDelay() const { 130 QuicTime::Delta PacingSender::RetransmissionDelay() const {
131 return sender_->RetransmissionDelay(); 131 return sender_->RetransmissionDelay();
132 } 132 }
133 133
134 QuicByteCount PacingSender::GetCongestionWindow() const { 134 QuicByteCount PacingSender::GetCongestionWindow() const {
135 return sender_->GetCongestionWindow(); 135 return sender_->GetCongestionWindow();
136 } 136 }
137 137
138 } // namespace net 138 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender.h ('k') | net/quic/congestion_control/send_algorithm_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698