| 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 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_DISPATCHER_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_DISPATCHER_H_ |
| 6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_DISPATCHER_H_ | 6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include "net/quic/core/quic_server_session_base.h" | 8 #include "net/quic/core/quic_server_session_base.h" |
| 9 #include "net/tools/quic/quic_dispatcher.h" | 9 #include "net/tools/quic/quic_dispatcher.h" |
| 10 #include "net/tools/quic/quic_in_memory_cache.h" |
| 10 | 11 |
| 11 namespace net { | 12 namespace net { |
| 12 | 13 |
| 13 class QuicSimpleDispatcher : public QuicDispatcher { | 14 class QuicSimpleDispatcher : public QuicDispatcher { |
| 14 public: | 15 public: |
| 15 QuicSimpleDispatcher( | 16 QuicSimpleDispatcher( |
| 16 const QuicConfig& config, | 17 const QuicConfig& config, |
| 17 const QuicCryptoServerConfig* crypto_config, | 18 const QuicCryptoServerConfig* crypto_config, |
| 18 QuicVersionManager* version_manager, | 19 QuicVersionManager* version_manager, |
| 19 std::unique_ptr<QuicConnectionHelperInterface> helper, | 20 std::unique_ptr<QuicConnectionHelperInterface> helper, |
| 20 std::unique_ptr<QuicCryptoServerStream::Helper> session_helper, | 21 std::unique_ptr<QuicCryptoServerStream::Helper> session_helper, |
| 21 std::unique_ptr<QuicAlarmFactory> alarm_factory); | 22 std::unique_ptr<QuicAlarmFactory> alarm_factory, |
| 23 QuicInMemoryCache* in_memory_cache); |
| 22 | 24 |
| 23 ~QuicSimpleDispatcher() override; | 25 ~QuicSimpleDispatcher() override; |
| 24 | 26 |
| 25 protected: | 27 protected: |
| 26 QuicServerSessionBase* CreateQuicSession( | 28 QuicServerSessionBase* CreateQuicSession( |
| 27 QuicConnectionId connection_id, | 29 QuicConnectionId connection_id, |
| 28 const QuicSocketAddress& client_address) override; | 30 const QuicSocketAddress& client_address) override; |
| 31 |
| 32 QuicInMemoryCache* in_memory_cache() { return in_memory_cache_; } |
| 33 |
| 34 private: |
| 35 QuicInMemoryCache* in_memory_cache_; // Unowned. |
| 29 }; | 36 }; |
| 30 | 37 |
| 31 } // namespace net | 38 } // namespace net |
| 32 | 39 |
| 33 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_DISPATCHER_H_ | 40 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_DISPATCHER_H_ |
| OLD | NEW |