| Index: net/tools/quic/quic_time_wait_list_manager.h
|
| diff --git a/net/tools/quic/quic_time_wait_list_manager.h b/net/tools/quic/quic_time_wait_list_manager.h
|
| index 9a9eccd5e78fb9fd530d84805574dabcb09b6657..c2368dc1553466dfec9528365e88cbc228219c56 100644
|
| --- a/net/tools/quic/quic_time_wait_list_manager.h
|
| +++ b/net/tools/quic/quic_time_wait_list_manager.h
|
| @@ -101,7 +101,7 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface {
|
| QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id);
|
|
|
| // The number of connections on the time-wait list.
|
| - size_t num_connections() const { return connection_id_map_.size(); }
|
| + size_t num_connections() const { return num_connections_; }
|
|
|
| protected:
|
| virtual QuicEncryptedPacket* BuildPublicReset(
|
| @@ -190,6 +190,12 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface {
|
| // Interface that manages blocked writers.
|
| QuicServerSessionVisitor* visitor_;
|
|
|
| + // Number of connection IDs in |connection_id_map_|. According to b/23531792,
|
| + // cost of size() of linked_hash_map is linear instead of constant, and a
|
| + // separate counter is maintained so that cost of num_connections() is
|
| + // constant. TODO(b/23531792): Remove this counter.
|
| + size_t num_connections_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager);
|
| };
|
|
|
|
|