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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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.h ('k') | net/quic/congestion_control/pacing_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/cubic.cc
diff --git a/net/quic/congestion_control/cubic.cc b/net/quic/congestion_control/cubic.cc
index 22b0a90a0176811f78a5927a108902d75cb92b9b..eaec6218ff4a0b23736feb0503fa0f6e4679123c 100644
--- a/net/quic/congestion_control/cubic.cc
+++ b/net/quic/congestion_control/cubic.cc
@@ -78,12 +78,11 @@ void Cubic::Reset() {
last_target_congestion_window_ = 0;
}
-void Cubic::UpdateCongestionControlStats(
- QuicTcpCongestionWindow new_cubic_mode_cwnd,
- QuicTcpCongestionWindow new_reno_mode_cwnd) {
+void Cubic::UpdateCongestionControlStats(QuicPacketCount new_cubic_mode_cwnd,
+ QuicPacketCount new_reno_mode_cwnd) {
- QuicTcpCongestionWindow highest_new_cwnd = max(new_cubic_mode_cwnd,
- new_reno_mode_cwnd);
+ QuicPacketCount highest_new_cwnd = max(new_cubic_mode_cwnd,
+ new_reno_mode_cwnd);
if (last_congestion_window_ < highest_new_cwnd) {
// cwnd will increase to highest_new_cwnd.
stats_->cwnd_increase_congestion_avoidance +=
@@ -96,8 +95,8 @@ void Cubic::UpdateCongestionControlStats(
}
}
-QuicTcpCongestionWindow Cubic::CongestionWindowAfterPacketLoss(
- QuicTcpCongestionWindow current_congestion_window) {
+QuicPacketCount Cubic::CongestionWindowAfterPacketLoss(
+ QuicPacketCount current_congestion_window) {
if (current_congestion_window < last_max_congestion_window_) {
// We never reached the old max, so assume we are competing with another
// flow. Use our extra back off factor to allow the other flow to go up.
@@ -110,8 +109,8 @@ QuicTcpCongestionWindow Cubic::CongestionWindowAfterPacketLoss(
return static_cast<int>(current_congestion_window * Beta());
}
-QuicTcpCongestionWindow Cubic::CongestionWindowAfterAck(
- QuicTcpCongestionWindow current_congestion_window,
+QuicPacketCount Cubic::CongestionWindowAfterAck(
+ QuicPacketCount current_congestion_window,
QuicTime::Delta delay_min) {
acked_packets_count_ += 1; // Packets acked.
QuicTime current_time = clock_->ApproximateNow();
@@ -150,10 +149,10 @@ QuicTcpCongestionWindow Cubic::CongestionWindowAfterAck(
base::Time::kMicrosecondsPerSecond;
int64 offset = time_to_origin_point_ - elapsed_time;
- QuicTcpCongestionWindow delta_congestion_window = (kCubeCongestionWindowScale
+ QuicPacketCount delta_congestion_window = (kCubeCongestionWindowScale
* offset * offset * offset) >> kCubeScale;
- QuicTcpCongestionWindow target_congestion_window =
+ QuicPacketCount target_congestion_window =
origin_point_congestion_window_ - delta_congestion_window;
DCHECK_LT(0u, estimated_tcp_congestion_window_);
« no previous file with comments | « net/quic/congestion_control/cubic.h ('k') | net/quic/congestion_control/pacing_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698