| Index: net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
|
| diff --git a/net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc b/net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
|
| index 0f914b2847950114ad0d9384b6a37b4540e1712a..269cfda00ff9744e3ea42b9fab0e45477c33b7dd 100644
|
| --- a/net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
|
| +++ b/net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
|
| @@ -13,8 +13,6 @@
|
| #include "net/quic/core/quic_bug_tracker.h"
|
| #include "net/quic/core/quic_flags.h"
|
|
|
| -using std::max;
|
| -using std::min;
|
|
|
| namespace net {
|
|
|
| @@ -63,9 +61,9 @@ void TcpCubicSenderBytes::SetCongestionWindowFromBandwidthAndRtt(
|
| QuicByteCount new_congestion_window = bandwidth.ToBytesPerPeriod(rtt);
|
| // Limit new CWND if needed.
|
| congestion_window_ =
|
| - max(min_congestion_window_,
|
| - min(new_congestion_window,
|
| - kMaxResumptionCongestionWindow * kDefaultTCPMSS));
|
| + std::max(min_congestion_window_,
|
| + std::min(new_congestion_window,
|
| + kMaxResumptionCongestionWindow * kDefaultTCPMSS));
|
| }
|
|
|
| void TcpCubicSenderBytes::SetCongestionWindowInPackets(
|
| @@ -98,8 +96,8 @@ void TcpCubicSenderBytes::OnPacketLost(QuicPacketNumber packet_number,
|
| stats_->slowstart_bytes_lost += lost_bytes;
|
| if (slow_start_large_reduction_) {
|
| // Reduce congestion window by lost_bytes for every loss.
|
| - congestion_window_ =
|
| - max(congestion_window_ - lost_bytes, min_slow_start_exit_window_);
|
| + congestion_window_ = std::max(congestion_window_ - lost_bytes,
|
| + min_slow_start_exit_window_);
|
| slowstart_threshold_ = congestion_window_;
|
| }
|
| }
|
| @@ -190,9 +188,9 @@ void TcpCubicSenderBytes::MaybeIncreaseCwnd(
|
| << " congestion window count: " << num_acked_packets_;
|
| } else {
|
| congestion_window_ =
|
| - min(max_congestion_window_,
|
| - cubic_.CongestionWindowAfterAck(acked_bytes, congestion_window_,
|
| - rtt_stats_->min_rtt()));
|
| + std::min(max_congestion_window_,
|
| + cubic_.CongestionWindowAfterAck(
|
| + acked_bytes, congestion_window_, rtt_stats_->min_rtt()));
|
| DVLOG(1) << "Cubic; congestion window: " << congestion_window_
|
| << " slowstart threshold: " << slowstart_threshold_;
|
| }
|
|
|