| Index: net/quic/congestion_control/cubic.cc
|
| diff --git a/net/quic/congestion_control/cubic.cc b/net/quic/congestion_control/cubic.cc
|
| index 55ce8037cedb0c8ede254df8023f89286814f61a..fc4104e27bf47bcbbeb8159b3af6157626f32f63 100644
|
| --- a/net/quic/congestion_control/cubic.cc
|
| +++ b/net/quic/congestion_control/cubic.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/logging.h"
|
| #include "base/time/time.h"
|
| #include "net/quic/congestion_control/cube_root.h"
|
| +#include "net/quic/quic_flags.h"
|
| #include "net/quic/quic_protocol.h"
|
|
|
| using std::max;
|
| @@ -80,7 +81,6 @@ void Cubic::Reset() {
|
|
|
| void Cubic::UpdateCongestionControlStats(QuicPacketCount new_cubic_mode_cwnd,
|
| QuicPacketCount new_reno_mode_cwnd) {
|
| -
|
| QuicPacketCount highest_new_cwnd = max(new_cubic_mode_cwnd,
|
| new_reno_mode_cwnd);
|
| if (last_congestion_window_ < highest_new_cwnd) {
|
| @@ -135,8 +135,17 @@ QuicPacketCount Cubic::CongestionWindowAfterAck(
|
| time_to_origin_point_ = 0;
|
| origin_point_congestion_window_ = current_congestion_window;
|
| } else {
|
| - time_to_origin_point_ = CubeRoot::Root(kCubeFactor *
|
| - (last_max_congestion_window_ - current_congestion_window));
|
| + if (FLAGS_quic_use_std_cbrt) {
|
| + time_to_origin_point_ =
|
| + std::cbrt(kCubeFactor * (last_max_congestion_window_ -
|
| + current_congestion_window));
|
| + } else {
|
| + // TODO(rjshade): Remove CubeRoot source when removing
|
| + // FLAGS_quic_use_std_cbrt.
|
| + time_to_origin_point_ =
|
| + CubeRoot::Root(kCubeFactor * (last_max_congestion_window_ -
|
| + current_congestion_window));
|
| + }
|
| origin_point_congestion_window_ =
|
| last_max_congestion_window_;
|
| }
|
|
|