| Index: net/quic/congestion_control/tcp_cubic_sender.cc
|
| diff --git a/net/quic/congestion_control/tcp_cubic_sender.cc b/net/quic/congestion_control/tcp_cubic_sender.cc
|
| index 7798a0308bd1c36e733e467bd4f984b5cd7fcdfa..6d5eeb5b6c92d643a322a7e5df62c953e2467e31 100644
|
| --- a/net/quic/congestion_control/tcp_cubic_sender.cc
|
| +++ b/net/quic/congestion_control/tcp_cubic_sender.cc
|
| @@ -63,8 +63,8 @@ bool TcpCubicSender::InSlowStart() const {
|
| void TcpCubicSender::SetFromConfig(const QuicConfig& config, bool is_server) {
|
| if (is_server && config.HasReceivedInitialCongestionWindow()) {
|
| // Set the initial window size.
|
| - congestion_window_ = min(kMaxInitialWindow,
|
| - config.ReceivedInitialCongestionWindow());
|
| + congestion_window_ =
|
| + min(kMaxInitialWindow, config.ReceivedInitialCongestionWindow());
|
| }
|
| }
|
|
|
| @@ -75,11 +75,12 @@ void TcpCubicSender::OnIncomingQuicCongestionFeedbackFrame(
|
| }
|
|
|
| void TcpCubicSender::OnPacketAcked(
|
| - QuicPacketSequenceNumber acked_sequence_number, QuicByteCount acked_bytes) {
|
| + QuicPacketSequenceNumber acked_sequence_number,
|
| + QuicByteCount acked_bytes) {
|
| DCHECK_GE(bytes_in_flight_, acked_bytes);
|
| bytes_in_flight_ -= acked_bytes;
|
| - largest_acked_sequence_number_ = max(acked_sequence_number,
|
| - largest_acked_sequence_number_);
|
| + largest_acked_sequence_number_ =
|
| + max(acked_sequence_number, largest_acked_sequence_number_);
|
| if (InRecovery()) {
|
| PrrOnPacketAcked(acked_bytes);
|
| return;
|
| @@ -205,8 +206,8 @@ QuicByteCount TcpCubicSender::GetCongestionWindow() const {
|
| }
|
|
|
| bool TcpCubicSender::IsCwndLimited() const {
|
| - const QuicByteCount congestion_window_bytes = congestion_window_ *
|
| - kMaxSegmentSize;
|
| + const QuicByteCount congestion_window_bytes =
|
| + congestion_window_ * kMaxSegmentSize;
|
| if (bytes_in_flight_ >= congestion_window_bytes) {
|
| return true;
|
| }
|
| @@ -217,7 +218,7 @@ bool TcpCubicSender::IsCwndLimited() const {
|
|
|
| bool TcpCubicSender::InRecovery() const {
|
| return largest_acked_sequence_number_ <= largest_sent_at_last_cutback_ &&
|
| - largest_acked_sequence_number_ != 0;
|
| + largest_acked_sequence_number_ != 0;
|
| }
|
|
|
| // Called when we receive an ack. Normal TCP tracks how many packets one ack
|
| @@ -281,7 +282,7 @@ void TcpCubicSender::OnRttUpdated(
|
| hybrid_slow_start_.ShouldExitSlowStart(rtt_stats_->latest_rtt(),
|
| rtt_stats_->min_rtt(),
|
| congestion_window_)) {
|
| - slowstart_threshold_ = congestion_window_;
|
| + slowstart_threshold_ = congestion_window_;
|
| }
|
| }
|
|
|
| @@ -320,7 +321,7 @@ QuicTime::Delta TcpCubicSender::PrrTimeUntilSend() {
|
| // AvailableSendWindow =
|
| // CEIL(prr_delivered * ssthresh / BytesInFlightAtLoss) - prr_sent
|
| if (prr_delivered_ * slowstart_threshold_ * kMaxSegmentSize >
|
| - prr_out_ * bytes_in_flight_before_loss_) {
|
| + prr_out_ * bytes_in_flight_before_loss_) {
|
| return QuicTime::Delta::Zero();
|
| }
|
| return QuicTime::Delta::Infinite();
|
|
|