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

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

Issue 188333003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation error - added NET_EXPORT_PRIVATE to QuicFixedUint32 Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/fix_rate_sender.h" 5 #include "net/quic/congestion_control/fix_rate_sender.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 void FixRateSender::UpdateRtt(QuicTime::Delta rtt_sample) { 115 void FixRateSender::UpdateRtt(QuicTime::Delta rtt_sample) {
116 // RTT can't be negative. 116 // RTT can't be negative.
117 DCHECK_LE(0, rtt_sample.ToMicroseconds()); 117 DCHECK_LE(0, rtt_sample.ToMicroseconds());
118 if (rtt_sample.IsInfinite()) { 118 if (rtt_sample.IsInfinite()) {
119 return; 119 return;
120 } 120 }
121 latest_rtt_ = rtt_sample; 121 latest_rtt_ = rtt_sample;
122 } 122 }
123 123
124 QuicTime::Delta FixRateSender::SmoothedRtt() const {
125 // TODO(satyamshekhar): Calculate and return smoothed rtt.
126 return latest_rtt_;
127 }
128
129 QuicTime::Delta FixRateSender::RetransmissionDelay() const { 124 QuicTime::Delta FixRateSender::RetransmissionDelay() const {
130 // TODO(pwestin): Calculate and return retransmission delay. 125 // TODO(pwestin): Calculate and return retransmission delay.
131 // Use 2 * the latest RTT for now. 126 // Use 2 * the latest RTT for now.
132 return latest_rtt_.Add(latest_rtt_); 127 return latest_rtt_.Add(latest_rtt_);
133 } 128 }
134 129
135 QuicByteCount FixRateSender::GetCongestionWindow() const { 130 QuicByteCount FixRateSender::GetCongestionWindow() const {
136 return 0; 131 return 0;
137 } 132 }
138 133
139 } // namespace net 134 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/fix_rate_sender.h ('k') | net/quic/congestion_control/inter_arrival_probe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698