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_http_response_cache.h" | 10 #include "net/tools/quic/quic_http_response_cache.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 std::unique_ptr<QuicCryptoServerStream::Helper> session_helper, | 21 std::unique_ptr<QuicCryptoServerStream::Helper> session_helper, |
22 std::unique_ptr<QuicAlarmFactory> alarm_factory, | 22 std::unique_ptr<QuicAlarmFactory> alarm_factory, |
23 QuicHttpResponseCache* response_cache); | 23 QuicHttpResponseCache* response_cache); |
24 | 24 |
25 ~QuicSimpleDispatcher() override; | 25 ~QuicSimpleDispatcher() override; |
26 | 26 |
27 int GetRstErrorCount(QuicRstStreamErrorCode rst_error_code) const; | 27 int GetRstErrorCount(QuicRstStreamErrorCode rst_error_code) const; |
28 | 28 |
29 void OnRstStreamReceived(const QuicRstStreamFrame& frame) override; | 29 void OnRstStreamReceived(const QuicRstStreamFrame& frame) override; |
30 | 30 |
| 31 void OnPushPromiseSent() override; |
| 32 |
| 33 int push_promise_sent_; |
| 34 |
31 protected: | 35 protected: |
32 QuicServerSessionBase* CreateQuicSession( | 36 QuicServerSessionBase* CreateQuicSession( |
33 QuicConnectionId connection_id, | 37 QuicConnectionId connection_id, |
34 const QuicSocketAddress& client_address) override; | 38 const QuicSocketAddress& client_address) override; |
35 | 39 |
36 QuicHttpResponseCache* response_cache() { return response_cache_; } | 40 QuicHttpResponseCache* response_cache() { return response_cache_; } |
37 | 41 |
38 private: | 42 private: |
39 QuicHttpResponseCache* response_cache_; // Unowned. | 43 QuicHttpResponseCache* response_cache_; // Unowned. |
40 | 44 |
41 // The map of the reset error code with its counter. | 45 // The map of the reset error code with its counter. |
42 std::map<QuicRstStreamErrorCode, int> rst_error_map_; | 46 std::map<QuicRstStreamErrorCode, int> rst_error_map_; |
43 }; | 47 }; |
44 | 48 |
45 } // namespace net | 49 } // namespace net |
46 | 50 |
47 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_DISPATCHER_H_ | 51 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_DISPATCHER_H_ |
OLD | NEW |