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

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

Issue 2130103002: Landing Recent QUIC changes until 2016-07-02 02:45 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/congestion_control/cubic.cc ('k') | net/quic/congestion_control/general_loss_algorithm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/cubic_bytes.cc
diff --git a/net/quic/congestion_control/cubic_bytes.cc b/net/quic/congestion_control/cubic_bytes.cc
index e09cc76eac713fb4aca1c9fce3c0338e3ea6e0a4..cae49226ab4ba43162b9c81e74a1d66850eca46d 100644
--- a/net/quic/congestion_control/cubic_bytes.cc
+++ b/net/quic/congestion_control/cubic_bytes.cc
@@ -112,7 +112,7 @@ QuicByteCount CubicBytes::CongestionWindowAfterAck(
// Cubic is "independent" of RTT, the update is limited by the time elapsed.
if (last_congestion_window_ == current_congestion_window &&
- (current_time.Subtract(last_update_time_) <= MaxCubicTimeInterval())) {
+ (current_time - last_update_time_ <= MaxCubicTimeInterval())) {
return max(last_target_congestion_window_,
estimated_tcp_congestion_window_);
}
@@ -140,7 +140,7 @@ QuicByteCount CubicBytes::CongestionWindowAfterAck(
// the round trip time in account. This is done to allow us to use shift as a
// divide operator.
int64_t elapsed_time =
- (current_time.Add(delay_min).Subtract(epoch_).ToMicroseconds() << 10) /
+ ((current_time + delay_min - epoch_).ToMicroseconds() << 10) /
kNumMicrosPerSecond;
int64_t offset = time_to_origin_point_ - elapsed_time;
« no previous file with comments | « net/quic/congestion_control/cubic.cc ('k') | net/quic/congestion_control/general_loss_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698