| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/debug/stack_trace.h" | |
| 10 #include "base/macros.h" | 9 #include "base/macros.h" |
| 11 #include "net/quic/core/crypto/quic_random.h" | 10 #include "net/quic/core/crypto/quic_random.h" |
| 12 #include "net/quic/core/quic_flags.h" | 11 #include "net/quic/core/quic_flags.h" |
| 13 #include "net/quic/core/quic_utils.h" | 12 #include "net/quic/core/quic_utils.h" |
| 14 #include "net/quic/platform/api/quic_bug_tracker.h" | 13 #include "net/quic/platform/api/quic_bug_tracker.h" |
| 15 #include "net/quic/platform/api/quic_logging.h" | 14 #include "net/quic/platform/api/quic_logging.h" |
| 16 #include "net/quic/platform/api/quic_ptr_util.h" | 15 #include "net/quic/platform/api/quic_ptr_util.h" |
| 16 #include "net/quic/platform/api/quic_stack_trace.h" |
| 17 #include "net/tools/quic/chlo_extractor.h" | 17 #include "net/tools/quic/chlo_extractor.h" |
| 18 #include "net/tools/quic/quic_per_connection_packet_writer.h" | 18 #include "net/tools/quic/quic_per_connection_packet_writer.h" |
| 19 #include "net/tools/quic/quic_simple_server_session.h" | 19 #include "net/tools/quic/quic_simple_server_session.h" |
| 20 #include "net/tools/quic/quic_time_wait_list_manager.h" | 20 #include "net/tools/quic/quic_time_wait_list_manager.h" |
| 21 #include "net/tools/quic/stateless_rejector.h" | 21 #include "net/tools/quic/stateless_rejector.h" |
| 22 | 22 |
| 23 using base::StringPiece; | 23 using base::StringPiece; |
| 24 using std::string; | 24 using std::string; |
| 25 | 25 |
| 26 namespace net { | 26 namespace net { |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 } | 490 } |
| 491 | 491 |
| 492 void QuicDispatcher::OnConnectionClosed(QuicConnectionId connection_id, | 492 void QuicDispatcher::OnConnectionClosed(QuicConnectionId connection_id, |
| 493 QuicErrorCode error, | 493 QuicErrorCode error, |
| 494 const string& error_details) { | 494 const string& error_details) { |
| 495 SessionMap::iterator it = session_map_.find(connection_id); | 495 SessionMap::iterator it = session_map_.find(connection_id); |
| 496 if (it == session_map_.end()) { | 496 if (it == session_map_.end()) { |
| 497 QUIC_BUG << "ConnectionId " << connection_id | 497 QUIC_BUG << "ConnectionId " << connection_id |
| 498 << " does not exist in the session map. Error: " | 498 << " does not exist in the session map. Error: " |
| 499 << QuicErrorCodeToString(error); | 499 << QuicErrorCodeToString(error); |
| 500 QUIC_BUG << base::debug::StackTrace().ToString(); | 500 QUIC_BUG << QuicStackTrace(); |
| 501 return; | 501 return; |
| 502 } | 502 } |
| 503 | 503 |
| 504 DVLOG_IF(1, error != QUIC_NO_ERROR) | 504 DVLOG_IF(1, error != QUIC_NO_ERROR) |
| 505 << "Closing connection (" << connection_id | 505 << "Closing connection (" << connection_id |
| 506 << ") due to error: " << QuicErrorCodeToString(error) | 506 << ") due to error: " << QuicErrorCodeToString(error) |
| 507 << ", with details: " << error_details; | 507 << ", with details: " << error_details; |
| 508 | 508 |
| 509 if (closed_session_list_.empty()) { | 509 if (closed_session_list_.empty()) { |
| 510 delete_sessions_alarm_->Update(helper()->GetClock()->ApproximateNow(), | 510 delete_sessions_alarm_->Update(helper()->GetClock()->ApproximateNow(), |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 void QuicDispatcher::DeliverPacketsToSession( | 994 void QuicDispatcher::DeliverPacketsToSession( |
| 995 const std::list<BufferedPacket>& packets, | 995 const std::list<BufferedPacket>& packets, |
| 996 QuicSession* session) { | 996 QuicSession* session) { |
| 997 for (const BufferedPacket& packet : packets) { | 997 for (const BufferedPacket& packet : packets) { |
| 998 session->ProcessUdpPacket(packet.server_address, packet.client_address, | 998 session->ProcessUdpPacket(packet.server_address, packet.client_address, |
| 999 *(packet.packet)); | 999 *(packet.packet)); |
| 1000 } | 1000 } |
| 1001 } | 1001 } |
| 1002 | 1002 |
| 1003 } // namespace net | 1003 } // namespace net |
| OLD | NEW |