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

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

Issue 2566703002: Various formatting cleanups to net/quic/core/frames (Closed)
Patch Set: Fix Created 4 years 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/core/congestion_control/cubic.h" 5 #include "net/quic/core/congestion_control/cubic.h"
6 6
7 #include <stdint.h>
8 #include <algorithm> 7 #include <algorithm>
9 #include <cmath> 8 #include <cmath>
9 #include <cstdint>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "net/quic/core/quic_flags.h" 12 #include "net/quic/core/quic_flags.h"
13 #include "net/quic/core/quic_packets.h" 13 #include "net/quic/core/quic_packets.h"
14 #include "net/quic/core/quic_time.h"
15
16 14
17 namespace net { 15 namespace net {
18 16
19 namespace { 17 namespace {
20 18
21 // Constants based on TCP defaults. 19 // Constants based on TCP defaults.
22 // The following constants are in 2^10 fractions of a second instead of ms to 20 // The following constants are in 2^10 fractions of a second instead of ms to
23 // allow a 10 shift right to divide. 21 // allow a 10 shift right to divide.
24 const int kCubeScale = 40; // 1024*1024^3 (first 1024 is from 0.100^3) 22 const int kCubeScale = 40; // 1024*1024^3 (first 1024 is from 0.100^3)
25 // where 0.100 is 100 ms which is the scaling 23 // where 0.100 is 100 ms which is the scaling
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // congestion_window, use highest (fastest). 194 // congestion_window, use highest (fastest).
197 if (target_congestion_window < estimated_tcp_congestion_window_) { 195 if (target_congestion_window < estimated_tcp_congestion_window_) {
198 target_congestion_window = estimated_tcp_congestion_window_; 196 target_congestion_window = estimated_tcp_congestion_window_;
199 } 197 }
200 198
201 DVLOG(1) << "Final target congestion_window: " << target_congestion_window; 199 DVLOG(1) << "Final target congestion_window: " << target_congestion_window;
202 return target_congestion_window; 200 return target_congestion_window;
203 } 201 }
204 202
205 } // namespace net 203 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/congestion_control/cubic.h ('k') | net/quic/core/congestion_control/cubic_bytes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698