| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_bytes.h" | 5 #include "net/quic/congestion_control/tcp_cubic_sender_bytes.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "net/quic/congestion_control/prr_sender.h" | 9 #include "net/quic/congestion_control/prr_sender.h" |
| 10 #include "net/quic/congestion_control/rtt_stats.h" | 10 #include "net/quic/congestion_control/rtt_stats.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 min_congestion_window_ = congestion_window * kDefaultTCPMSS; | 75 min_congestion_window_ = congestion_window * kDefaultTCPMSS; |
| 76 } | 76 } |
| 77 | 77 |
| 78 void TcpCubicSenderBytes::SetNumEmulatedConnections(int num_connections) { | 78 void TcpCubicSenderBytes::SetNumEmulatedConnections(int num_connections) { |
| 79 TcpCubicSenderBase::SetNumEmulatedConnections(num_connections); | 79 TcpCubicSenderBase::SetNumEmulatedConnections(num_connections); |
| 80 cubic_.SetNumConnections(num_connections_); | 80 cubic_.SetNumConnections(num_connections_); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void TcpCubicSenderBytes::SetMaxCongestionWindow( | 83 void TcpCubicSenderBytes::SetMaxCongestionWindow( |
| 84 QuicByteCount max_congestion_window) { | 84 QuicByteCount max_congestion_window) { |
| 85 DCHECK(!FLAGS_quic_ignore_srbf); |
| 85 max_congestion_window_ = max_congestion_window; | 86 max_congestion_window_ = max_congestion_window; |
| 86 } | 87 } |
| 87 | 88 |
| 88 void TcpCubicSenderBytes::ExitSlowstart() { | 89 void TcpCubicSenderBytes::ExitSlowstart() { |
| 89 slowstart_threshold_ = congestion_window_; | 90 slowstart_threshold_ = congestion_window_; |
| 90 } | 91 } |
| 91 | 92 |
| 92 void TcpCubicSenderBytes::OnPacketLost(QuicPacketNumber packet_number, | 93 void TcpCubicSenderBytes::OnPacketLost(QuicPacketNumber packet_number, |
| 93 QuicByteCount lost_bytes, | 94 QuicByteCount lost_bytes, |
| 94 QuicByteCount bytes_in_flight) { | 95 QuicByteCount bytes_in_flight) { |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 congestion_window_ = initial_tcp_congestion_window_; | 213 congestion_window_ = initial_tcp_congestion_window_; |
| 213 max_congestion_window_ = initial_max_tcp_congestion_window_; | 214 max_congestion_window_ = initial_max_tcp_congestion_window_; |
| 214 slowstart_threshold_ = initial_max_tcp_congestion_window_; | 215 slowstart_threshold_ = initial_max_tcp_congestion_window_; |
| 215 } | 216 } |
| 216 | 217 |
| 217 CongestionControlType TcpCubicSenderBytes::GetCongestionControlType() const { | 218 CongestionControlType TcpCubicSenderBytes::GetCongestionControlType() const { |
| 218 return reno_ ? kRenoBytes : kCubicBytes; | 219 return reno_ ? kRenoBytes : kCubicBytes; |
| 219 } | 220 } |
| 220 | 221 |
| 221 } // namespace net | 222 } // namespace net |
| OLD | NEW |