| 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 4449a50f6434aa8298ebcee7b5833ea26185f641..1e902d2a21ec68ae0ce4817aa337a0d8a4226baa 100644
|
| --- a/net/tools/quic/quic_time_wait_list_manager.cc
|
| +++ b/net/tools/quic/quic_time_wait_list_manager.cc
|
| @@ -39,8 +39,7 @@ class ConnectionIdCleanUpAlarm : public EpollAlarm {
|
| public:
|
| explicit ConnectionIdCleanUpAlarm(
|
| QuicTimeWaitListManager* time_wait_list_manager)
|
| - : time_wait_list_manager_(time_wait_list_manager) {
|
| - }
|
| + : time_wait_list_manager_(time_wait_list_manager) {}
|
|
|
| virtual int64 OnAlarm() OVERRIDE {
|
| EpollAlarm::OnAlarm();
|
| @@ -68,8 +67,7 @@ class QuicTimeWaitListManager::QueuedPacket {
|
| QuicEncryptedPacket* packet)
|
| : server_address_(server_address),
|
| client_address_(client_address),
|
| - packet_(packet) {
|
| - }
|
| + packet_(packet) {}
|
|
|
| const IPEndPoint& server_address() const { return server_address_; }
|
| const IPEndPoint& client_address() const { return client_address_; }
|
| @@ -119,8 +117,8 @@ void QuicTimeWaitListManager::AddConnectionIdToTimeWait(
|
| delete it->second.close_packet;
|
| connection_id_map_.erase(it);
|
| }
|
| - ConnectionIdData data(num_packets, version, clock_.ApproximateNow(),
|
| - close_packet);
|
| + ConnectionIdData data(
|
| + num_packets, version, clock_.ApproximateNow(), close_packet);
|
| connection_id_map_.insert(make_pair(connection_id, data));
|
| }
|
|
|
| @@ -165,17 +163,13 @@ void QuicTimeWaitListManager::ProcessPacket(
|
| return;
|
| }
|
| if (it->second.close_packet) {
|
| - QueuedPacket* queued_packet =
|
| - new QueuedPacket(server_address,
|
| - client_address,
|
| - it->second.close_packet->Clone());
|
| - // Takes ownership of the packet.
|
| - SendOrQueuePacket(queued_packet);
|
| + QueuedPacket* queued_packet = new QueuedPacket(
|
| + server_address, client_address, it->second.close_packet->Clone());
|
| + // Takes ownership of the packet.
|
| + SendOrQueuePacket(queued_packet);
|
| } else {
|
| - SendPublicReset(server_address,
|
| - client_address,
|
| - connection_id,
|
| - sequence_number);
|
| + SendPublicReset(
|
| + server_address, client_address, connection_id, sequence_number);
|
| }
|
| }
|
|
|
| @@ -200,9 +194,7 @@ void QuicTimeWaitListManager::SendPublicReset(
|
| packet.nonce_proof = 1010101;
|
| packet.client_address = client_address;
|
| QueuedPacket* queued_packet = new QueuedPacket(
|
| - server_address,
|
| - client_address,
|
| - BuildPublicReset(packet));
|
| + server_address, client_address, BuildPublicReset(packet));
|
| // Takes ownership of the packet.
|
| SendOrQueuePacket(queued_packet);
|
| }
|
| @@ -228,11 +220,11 @@ bool QuicTimeWaitListManager::WriteToWire(QueuedPacket* queued_packet) {
|
| visitor_->OnWriteBlocked(this);
|
| return false;
|
| }
|
| - WriteResult result = writer_->WritePacket(
|
| - queued_packet->packet()->data(),
|
| - queued_packet->packet()->length(),
|
| - queued_packet->server_address().address(),
|
| - queued_packet->client_address());
|
| + WriteResult result =
|
| + writer_->WritePacket(queued_packet->packet()->data(),
|
| + queued_packet->packet()->length(),
|
| + queued_packet->server_address().address(),
|
| + queued_packet->client_address());
|
| if (result.status == WRITE_STATUS_BLOCKED) {
|
| // If blocked and unbuffered, return false to retry sending.
|
| DCHECK(writer_->IsWriteBlocked());
|
| @@ -255,8 +247,8 @@ void QuicTimeWaitListManager::SetConnectionIdCleanUpAlarm() {
|
| QuicTime now = clock_.ApproximateNow();
|
| if (now.Subtract(oldest_connection_id) < kTimeWaitPeriod_) {
|
| next_alarm_interval = oldest_connection_id.Add(kTimeWaitPeriod_)
|
| - .Subtract(now)
|
| - .ToMicroseconds();
|
| + .Subtract(now)
|
| + .ToMicroseconds();
|
| } else {
|
| LOG(ERROR) << "ConnectionId lingered for longer than kTimeWaitPeriod";
|
| next_alarm_interval = 0;
|
|
|