| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |