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

Unified Diff: net/quic/congestion_control/hybrid_slow_start.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/congestion_control/hybrid_slow_start.cc
diff --git a/net/quic/congestion_control/hybrid_slow_start.cc b/net/quic/congestion_control/hybrid_slow_start.cc
index c21eec42b98f702cc10675e2d72712137174e825..a5f53f967d967fa0bc0f7ed026af9d9ab8b22d5b 100644
--- a/net/quic/congestion_control/hybrid_slow_start.cc
+++ b/net/quic/congestion_control/hybrid_slow_start.cc
@@ -13,14 +13,14 @@ namespace net {
// Note(pwestin): the magic clamping numbers come from the original code in
// tcp_cubic.c.
-const int64 kHybridStartLowWindow = 16;
+const int64_t kHybridStartLowWindow = 16;
// Number of delay samples for detecting the increase of delay.
-const uint32 kHybridStartMinSamples = 8;
+const uint32_t kHybridStartMinSamples = 8;
// Exit slow start if the min rtt has increased by more than 1/8th.
const int kHybridStartDelayFactorExp = 3; // 2^3 = 8
// The original paper specifies 2 and 8ms, but those have changed over time.
-const int64 kHybridStartDelayMinThresholdUs = 4000;
-const int64 kHybridStartDelayMaxThresholdUs = 16000;
+const int64_t kHybridStartDelayMinThresholdUs = 4000;
+const int64_t kHybridStartDelayMaxThresholdUs = 16000;
HybridSlowStart::HybridSlowStart()
: started_(false),
@@ -86,7 +86,7 @@ bool HybridSlowStart::ShouldExitSlowStart(QuicTime::Delta latest_rtt,
// We only need to check this once per round.
if (rtt_sample_count_ == kHybridStartMinSamples) {
// Divide min_rtt by 8 to get a rtt increase threshold for exiting.
- int64 min_rtt_increase_threshold_us =
+ int64_t min_rtt_increase_threshold_us =
min_rtt.ToMicroseconds() >> kHybridStartDelayFactorExp;
// Ensure the rtt threshold is never less than 2ms or more than 16ms.
min_rtt_increase_threshold_us =
« no previous file with comments | « net/quic/congestion_control/hybrid_slow_start.h ('k') | net/quic/congestion_control/loss_detection_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698