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

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

Issue 1310753008: relnote: Add num_connections_ in quic_time_wait_list_manager to record (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Allow_individual_QUIC_writers_101617105
Patch Set: Created 5 years, 3 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') | no next file » | 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 68d1b9ec39485276e5ef89ed91a5d94929d7575d..c34aa1bb0517040d8cbce6d56920a53549855cc3 100644
--- a/net/tools/quic/quic_time_wait_list_manager.cc
+++ b/net/tools/quic/quic_time_wait_list_manager.cc
@@ -88,7 +88,8 @@ QuicTimeWaitListManager::QuicTimeWaitListManager(
helper->CreateAlarm(new ConnectionIdCleanUpAlarm(this))),
clock_(helper->GetClock()),
writer_(writer),
- visitor_(visitor) {
+ visitor_(visitor),
+ num_connections_(0) {
SetConnectionIdCleanUpAlarm();
}
@@ -117,6 +118,7 @@ void QuicTimeWaitListManager::AddConnectionIdToTimeWait(
num_packets = it->second.num_packets;
delete it->second.close_packet;
connection_id_map_.erase(it);
+ --num_connections_;
}
TrimTimeWaitListIfNeeded();
DCHECK_LT(num_connections(),
@@ -124,6 +126,7 @@ void QuicTimeWaitListManager::AddConnectionIdToTimeWait(
ConnectionIdData data(num_packets, version, clock_->ApproximateNow(),
close_packet, connection_rejected_statelessly);
connection_id_map_.insert(std::make_pair(connection_id, data));
+ ++num_connections_;
if (new_connection_id) {
visitor_->OnConnectionAddedToTimeWaitList(connection_id);
}
@@ -288,6 +291,7 @@ bool QuicTimeWaitListManager::MaybeExpireOldestConnection(
const QuicConnectionId connection_id = it->first;
delete it->second.close_packet;
connection_id_map_.erase(it);
+ --num_connections_;
visitor_->OnConnectionRemovedFromTimeWaitList(connection_id);
return true;
}
« no previous file with comments | « net/tools/quic/quic_time_wait_list_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698