| Index: net/quic/congestion_control/cubic.cc
|
| diff --git a/net/quic/congestion_control/cubic.cc b/net/quic/congestion_control/cubic.cc
|
| index d07af1716fd454b2825394ba8eb6b84bee4e1b92..6cd6557677447f45f89b4d52ef5cd9afdf76f134 100644
|
| --- a/net/quic/congestion_control/cubic.cc
|
| +++ b/net/quic/congestion_control/cubic.cc
|
| @@ -8,7 +8,6 @@
|
| #include <algorithm>
|
| #include <cmath>
|
|
|
| -#include "base/basictypes.h"
|
| #include "base/logging.h"
|
| #include "net/quic/quic_flags.h"
|
| #include "net/quic/quic_protocol.h"
|
| @@ -27,10 +26,10 @@ const int kCubeScale = 40; // 1024*1024^3 (first 1024 is from 0.100^3)
|
| // where 0.100 is 100 ms which is the scaling
|
| // round trip time.
|
| const int kCubeCongestionWindowScale = 410;
|
| -const uint64 kCubeFactor =
|
| +const uint64_t kCubeFactor =
|
| (UINT64_C(1) << kCubeScale) / kCubeCongestionWindowScale;
|
|
|
| -const uint32 kDefaultNumConnections = 2;
|
| +const uint32_t kDefaultNumConnections = 2;
|
| const float kBeta = 0.7f; // Default Cubic backoff factor.
|
| // Additional backoff factor when loss occurs in the concave part of the Cubic
|
| // curve. This additional backoff factor is expected to give up bandwidth to
|
| @@ -136,9 +135,9 @@ QuicPacketCount Cubic::CongestionWindowAfterAck(
|
| time_to_origin_point_ = 0;
|
| origin_point_congestion_window_ = current_congestion_window;
|
| } else {
|
| - time_to_origin_point_ =
|
| - static_cast<uint32>(cbrt(kCubeFactor * (last_max_congestion_window_ -
|
| - current_congestion_window)));
|
| + time_to_origin_point_ = static_cast<uint32_t>(
|
| + cbrt(kCubeFactor *
|
| + (last_max_congestion_window_ - current_congestion_window)));
|
| origin_point_congestion_window_ = last_max_congestion_window_;
|
| }
|
| } else {
|
| @@ -157,11 +156,11 @@ QuicPacketCount Cubic::CongestionWindowAfterAck(
|
| // Change the time unit from microseconds to 2^10 fractions per second. Take
|
| // the round trip time in account. This is done to allow us to use shift as a
|
| // divide operator.
|
| - int64 elapsed_time =
|
| + int64_t elapsed_time =
|
| (current_time.Add(delay_min).Subtract(epoch_).ToMicroseconds() << 10) /
|
| kNumMicrosPerSecond;
|
|
|
| - int64 offset = time_to_origin_point_ - elapsed_time;
|
| + int64_t offset = time_to_origin_point_ - elapsed_time;
|
| QuicPacketCount delta_congestion_window =
|
| (kCubeCongestionWindowScale * offset * offset * offset) >> kCubeScale;
|
|
|
|
|