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

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

Issue 11961022: Remove default constructors for QuicTime and QuicTime::Delta and used static Zero() methods instead… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « no previous file | net/quic/congestion_control/fix_rate_sender.cc » ('j') | net/quic/quic_time.cc » ('J')
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 6ea46bd100a252c2d35a0f845ed6d03f8549fddd..c1faeb37c7ce2f31aef753b0c16ec111c9e86d9d 100644
--- a/net/quic/congestion_control/cubic.cc
+++ b/net/quic/congestion_control/cubic.cc
@@ -70,7 +70,9 @@ const uint32 cube_root_table[] = {
} // namespace
Cubic::Cubic(const QuicClock* clock)
- : clock_(clock) {
+ : clock_(clock),
+ epoch_(QuicTime::Zero()),
+ last_update_time_(QuicTime::Zero()) {
Reset();
}
@@ -103,8 +105,8 @@ uint32 Cubic::CubeRoot(uint64 a) {
}
void Cubic::Reset() {
- epoch_ = QuicTime(); // Reset time.
- last_update_time_ = QuicTime(); // Reset time.
+ epoch_ = QuicTime::Zero(); // Reset time.
+ last_update_time_ = QuicTime::Zero(); // Reset time.
last_congestion_window_ = 0;
last_max_congestion_window_ = 0;
acked_packets_count_ = 0;
@@ -124,7 +126,7 @@ QuicTcpCongestionWindow Cubic::CongestionWindowAfterPacketLoss(
} else {
last_max_congestion_window_ = current_congestion_window;
}
- epoch_ = QuicTime(); // Reset time.
+ epoch_ = QuicTime::Zero(); // Reset time.
return (current_congestion_window * kBeta) >> 10;
}
« no previous file with comments | « no previous file | net/quic/congestion_control/fix_rate_sender.cc » ('j') | net/quic/quic_time.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698