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

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

Issue 400813002: Cleanup and adding GetCongestionControlType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.h ('k') | net/quic/quic_connection.cc » ('j') | 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) 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/tcp_cubic_sender.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "net/quic/congestion_control/rtt_stats.h" 10 #include "net/quic/congestion_control/rtt_stats.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // Checks a simplified version of the PRR formula that doesn't use division: 338 // Checks a simplified version of the PRR formula that doesn't use division:
339 // AvailableSendWindow = 339 // AvailableSendWindow =
340 // CEIL(prr_delivered * ssthresh / BytesInFlightAtLoss) - prr_sent 340 // CEIL(prr_delivered * ssthresh / BytesInFlightAtLoss) - prr_sent
341 if (prr_delivered_ * slowstart_threshold_ * kMaxSegmentSize > 341 if (prr_delivered_ * slowstart_threshold_ * kMaxSegmentSize >
342 prr_out_ * bytes_in_flight_before_loss_) { 342 prr_out_ * bytes_in_flight_before_loss_) {
343 return QuicTime::Delta::Zero(); 343 return QuicTime::Delta::Zero();
344 } 344 }
345 return QuicTime::Delta::Infinite(); 345 return QuicTime::Delta::Infinite();
346 } 346 }
347 347
348 CongestionControlType TcpCubicSender::GetCongestionControlType() const {
349 return reno_ ? kReno : kCubic;
350 }
351
348 } // namespace net 352 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.h ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698