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

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

Issue 2524523002: Remove various 'using std::' statements from QUIC code and use (Closed)
Patch Set: Rebase Created 4 years 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/chromium/quic_utils_chromium_test.cc ('k') | net/quic/core/congestion_control/cubic_bytes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/congestion_control/cubic.cc
diff --git a/net/quic/core/congestion_control/cubic.cc b/net/quic/core/congestion_control/cubic.cc
index 8a5083bb272d7a519693036040e1b9263995e0e8..26ce0698e8a8c0d67cd7eb5681c1dc24572ac63d 100644
--- a/net/quic/core/congestion_control/cubic.cc
+++ b/net/quic/core/congestion_control/cubic.cc
@@ -13,8 +13,6 @@
#include "net/quic/core/quic_packets.h"
#include "net/quic/core/quic_time.h"
-using std::max;
-using std::min;
namespace net {
@@ -118,8 +116,8 @@ QuicPacketCount Cubic::CongestionWindowAfterAck(
// Cubic is "independent" of RTT, the update is limited by the time elapsed.
if (last_congestion_window_ == current_congestion_window &&
(current_time - last_update_time_ <= MaxCubicTimeInterval())) {
- return max(last_target_congestion_window_,
- estimated_tcp_congestion_window_);
+ return std::max(last_target_congestion_window_,
+ estimated_tcp_congestion_window_);
}
last_congestion_window_ = current_congestion_window;
last_update_time_ = current_time;
@@ -172,8 +170,8 @@ QuicPacketCount Cubic::CongestionWindowAfterAck(
// Limit the CWND increase to half the acked packets rounded up to the
// nearest packet.
target_congestion_window =
- min(target_congestion_window,
- current_congestion_window + (epoch_packets_count_ + 1) / 2);
+ std::min(target_congestion_window,
+ current_congestion_window + (epoch_packets_count_ + 1) / 2);
DCHECK_LT(0u, estimated_tcp_congestion_window_);
// With dynamic beta/alpha based on number of active streams, it is possible
« no previous file with comments | « net/quic/chromium/quic_utils_chromium_test.cc ('k') | net/quic/core/congestion_control/cubic_bytes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698