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" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "net/quic/quic_bug_tracker.h" | 13 #include "net/quic/quic_bug_tracker.h" |
14 #include "net/quic/quic_flags.h" | 14 #include "net/quic/quic_flags.h" |
15 #include "net/quic/quic_utils.h" | 15 #include "net/quic/quic_utils.h" |
16 #include "net/tools/quic/quic_per_connection_packet_writer.h" | 16 #include "net/tools/quic/quic_per_connection_packet_writer.h" |
17 #include "net/tools/quic/quic_simple_server_session.h" | 17 #include "net/tools/quic/quic_simple_server_session.h" |
18 #include "net/tools/quic/quic_time_wait_list_manager.h" | 18 #include "net/tools/quic/quic_time_wait_list_manager.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 | 21 |
22 | |
23 using std::make_pair; | 22 using std::make_pair; |
24 using base::StringPiece; | 23 using base::StringPiece; |
25 | 24 |
26 namespace { | 25 namespace { |
27 | 26 |
28 // An alarm that informs the QuicDispatcher to delete old sessions. | 27 // An alarm that informs the QuicDispatcher to delete old sessions. |
29 class DeleteSessionsAlarm : public QuicAlarm::Delegate { | 28 class DeleteSessionsAlarm : public QuicAlarm::Delegate { |
30 public: | 29 public: |
31 explicit DeleteSessionsAlarm(QuicDispatcher* dispatcher) | 30 explicit DeleteSessionsAlarm(QuicDispatcher* dispatcher) |
32 : dispatcher_(dispatcher) {} | 31 : dispatcher_(dispatcher) {} |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 | 471 |
473 QuicPacketWriter* QuicDispatcher::CreatePerConnectionWriter() { | 472 QuicPacketWriter* QuicDispatcher::CreatePerConnectionWriter() { |
474 return new QuicPerConnectionPacketWriter(writer_.get()); | 473 return new QuicPerConnectionPacketWriter(writer_.get()); |
475 } | 474 } |
476 | 475 |
477 void QuicDispatcher::SetLastError(QuicErrorCode error) { | 476 void QuicDispatcher::SetLastError(QuicErrorCode error) { |
478 last_error_ = error; | 477 last_error_ = error; |
479 } | 478 } |
480 | 479 |
481 } // namespace net | 480 } // namespace net |
OLD | NEW |