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

Unified Diff: net/tools/quic/quic_time_wait_list_manager.cc

Issue 1029463003: Improve tests. Correct things clang_tidy complains about. Make (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/tools/quic/quic_time_wait_list_manager.h ('k') | net/tools/quic/quic_time_wait_list_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_time_wait_list_manager.cc
diff --git a/net/tools/quic/quic_time_wait_list_manager.cc b/net/tools/quic/quic_time_wait_list_manager.cc
index 98f96ece34c455b36aa67f7bd514f15070184246..4179af59ab0b2523966f447c23bd8a2d56d98a27 100644
--- a/net/tools/quic/quic_time_wait_list_manager.cc
+++ b/net/tools/quic/quic_time_wait_list_manager.cc
@@ -86,7 +86,7 @@ QuicTimeWaitListManager::QuicTimeWaitListManager(
EpollServer* epoll_server,
const QuicVersionVector& supported_versions)
: epoll_server_(epoll_server),
- kTimeWaitPeriod_(
+ time_wait_period_(
QuicTime::Delta::FromSeconds(FLAGS_quic_time_wait_list_seconds)),
connection_id_clean_up_alarm_(new ConnectionIdCleanUpAlarm(this)),
clock_(epoll_server_),
@@ -259,17 +259,17 @@ void QuicTimeWaitListManager::SetConnectionIdCleanUpAlarm() {
QuicTime oldest_connection_id =
connection_id_map_.begin()->second.time_added;
QuicTime now = clock_.ApproximateNow();
- if (now.Subtract(oldest_connection_id) < kTimeWaitPeriod_) {
- next_alarm_interval = oldest_connection_id.Add(kTimeWaitPeriod_)
- .Subtract(now)
- .ToMicroseconds();
+ if (now.Subtract(oldest_connection_id) < time_wait_period_) {
+ next_alarm_interval = oldest_connection_id.Add(time_wait_period_)
+ .Subtract(now)
+ .ToMicroseconds();
} else {
- LOG(ERROR) << "ConnectionId lingered for longer than kTimeWaitPeriod";
+ LOG(ERROR) << "ConnectionId lingered for longer than time_wait_period_";
next_alarm_interval = 0;
}
} else {
- // No connection_ids added so none will expire before kTimeWaitPeriod_.
- next_alarm_interval = kTimeWaitPeriod_.ToMicroseconds();
+ // No connection_ids added so none will expire before time_wait_period_.
+ next_alarm_interval = time_wait_period_.ToMicroseconds();
}
epoll_server_->RegisterAlarmApproximateDelta(
@@ -297,7 +297,7 @@ bool QuicTimeWaitListManager::MaybeExpireOldestConnection(
void QuicTimeWaitListManager::CleanUpOldConnectionIds() {
QuicTime now = clock_.ApproximateNow();
- QuicTime expiration = now.Subtract(kTimeWaitPeriod_);
+ QuicTime expiration = now.Subtract(time_wait_period_);
while (MaybeExpireOldestConnection(expiration)) {
}
« no previous file with comments | « net/tools/quic/quic_time_wait_list_manager.h ('k') | net/tools/quic/quic_time_wait_list_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698