OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/tools/quic/quic_dispatcher.h" | 5 #include "net/tools/quic/quic_dispatcher.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <utility> |
8 | 8 |
9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "net/quic/quic_blocked_writer_interface.h" | 11 #include "base/stl_util.h" |
12 #include "net/quic/quic_flags.h" | |
13 #include "net/quic/quic_utils.h" | 12 #include "net/quic/quic_utils.h" |
14 #include "net/tools/quic/quic_per_connection_packet_writer.h" | 13 #include "net/tools/quic/quic_per_connection_packet_writer.h" |
15 #include "net/tools/quic/quic_time_wait_list_manager.h" | 14 #include "net/tools/quic/quic_time_wait_list_manager.h" |
16 | 15 |
17 namespace net { | 16 namespace net { |
18 | 17 |
19 namespace tools { | 18 namespace tools { |
20 | 19 |
21 using base::StringPiece; | 20 using base::StringPiece; |
22 | 21 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 QuicErrorCode error) { | 354 QuicErrorCode error) { |
356 SessionMap::iterator it = session_map_.find(connection_id); | 355 SessionMap::iterator it = session_map_.find(connection_id); |
357 if (it == session_map_.end()) { | 356 if (it == session_map_.end()) { |
358 LOG(DFATAL) << "ConnectionId " << connection_id | 357 LOG(DFATAL) << "ConnectionId " << connection_id |
359 << " does not exist in the session map. " | 358 << " does not exist in the session map. " |
360 << "Error: " << QuicUtils::ErrorToString(error); | 359 << "Error: " << QuicUtils::ErrorToString(error); |
361 LOG(DFATAL) << base::debug::StackTrace().ToString(); | 360 LOG(DFATAL) << base::debug::StackTrace().ToString(); |
362 return; | 361 return; |
363 } | 362 } |
364 | 363 |
365 DLOG_IF(INFO, error != QUIC_NO_ERROR) << "Closing connection (" | 364 DVLOG_IF(1, error != QUIC_NO_ERROR) << "Closing connection (" |
366 << connection_id | 365 << connection_id |
367 << ") due to error: " | 366 << ") due to error: " |
368 << QuicUtils::ErrorToString(error); | 367 << QuicUtils::ErrorToString(error); |
369 | 368 |
370 if (closed_session_list_.empty()) { | 369 if (closed_session_list_.empty()) { |
371 delete_sessions_alarm_->Cancel(); | 370 delete_sessions_alarm_->Cancel(); |
372 delete_sessions_alarm_->Set(helper()->GetClock()->ApproximateNow()); | 371 delete_sessions_alarm_->Set(helper()->GetClock()->ApproximateNow()); |
373 } | 372 } |
374 closed_session_list_.push_back(it->second); | 373 closed_session_list_.push_back(it->second); |
375 CleanUpSession(it); | 374 CleanUpSession(it); |
376 } | 375 } |
377 | 376 |
378 void QuicDispatcher::OnWriteBlocked( | 377 void QuicDispatcher::OnWriteBlocked( |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( | 428 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( |
430 header.connection_id)); | 429 header.connection_id)); |
431 | 430 |
432 // Continue parsing the packet to extract the sequence number. Then | 431 // Continue parsing the packet to extract the sequence number. Then |
433 // send it to the time wait manager in OnUnathenticatedHeader. | 432 // send it to the time wait manager in OnUnathenticatedHeader. |
434 return true; | 433 return true; |
435 } | 434 } |
436 | 435 |
437 } // namespace tools | 436 } // namespace tools |
438 } // namespace net | 437 } // namespace net |
OLD | NEW |