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

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

Issue 1553623002: Remove random lonely semicolons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix formatting Created 4 years, 11 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
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/cubic.h" 5 #include "net/quic/congestion_control/cubic.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // kNConnectionBeta is the backoff factor after loss for our N-connection 63 // kNConnectionBeta is the backoff factor after loss for our N-connection
64 // emulation, which emulates the effective backoff of an ensemble of N 64 // emulation, which emulates the effective backoff of an ensemble of N
65 // TCP-Reno connections on a single loss event. The effective multiplier is 65 // TCP-Reno connections on a single loss event. The effective multiplier is
66 // computed as: 66 // computed as:
67 return (num_connections_ - 1 + kBeta) / num_connections_; 67 return (num_connections_ - 1 + kBeta) / num_connections_;
68 } 68 }
69 69
70 void Cubic::Reset() { 70 void Cubic::Reset() {
71 epoch_ = QuicTime::Zero(); // Reset time. 71 epoch_ = QuicTime::Zero(); // Reset time.
72 app_limited_start_time_ = QuicTime::Zero(); 72 app_limited_start_time_ = QuicTime::Zero();
73 ;
74 last_update_time_ = QuicTime::Zero(); // Reset time. 73 last_update_time_ = QuicTime::Zero(); // Reset time.
75 last_congestion_window_ = 0; 74 last_congestion_window_ = 0;
76 last_max_congestion_window_ = 0; 75 last_max_congestion_window_ = 0;
77 acked_packets_count_ = 0; 76 acked_packets_count_ = 0;
78 estimated_tcp_congestion_window_ = 0; 77 estimated_tcp_congestion_window_ = 0;
79 origin_point_congestion_window_ = 0; 78 origin_point_congestion_window_ = 0;
80 time_to_origin_point_ = 0; 79 time_to_origin_point_ = 0;
81 last_target_congestion_window_ = 0; 80 last_target_congestion_window_ = 0;
82 } 81 }
83 82
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // congestion_window, use highest (fastest). 188 // congestion_window, use highest (fastest).
190 if (target_congestion_window < estimated_tcp_congestion_window_) { 189 if (target_congestion_window < estimated_tcp_congestion_window_) {
191 target_congestion_window = estimated_tcp_congestion_window_; 190 target_congestion_window = estimated_tcp_congestion_window_;
192 } 191 }
193 192
194 DVLOG(1) << "Final target congestion_window: " << target_congestion_window; 193 DVLOG(1) << "Final target congestion_window: " << target_congestion_window;
195 return target_congestion_window; 194 return target_congestion_window;
196 } 195 }
197 196
198 } // namespace net 197 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698