Renjie Tang | 01447c8 | 2019-09-24 19:32:59 | [diff] [blame] | 1 | // Copyright (c) 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef NET_QUIC_QUIC_HTTP3_LOGGER_H_ |
| 6 | #define NET_QUIC_QUIC_HTTP3_LOGGER_H_ |
| 7 | |
| 8 | #include <stddef.h> |
| 9 | |
| 10 | #include <bitset> |
| 11 | #include <string> |
| 12 | |
| 13 | #include "base/macros.h" |
| 14 | #include "base/timer/timer.h" |
| 15 | #include "net/log/net_log_with_source.h" |
| 16 | #include "net/third_party/quiche/src/quic/core/http/quic_spdy_session.h" |
| 17 | |
| 18 | namespace net { |
| 19 | |
| 20 | // This class is a debug visitor of a quic::QuicSpdySession which logs events |
Bence Béky | 230fdd9 | 2019-10-10 02:32:03 | [diff] [blame] | 21 | // to |net_log| and records histograms. |
Renjie Tang | 01447c8 | 2019-09-24 19:32:59 | [diff] [blame] | 22 | class NET_EXPORT_PRIVATE QuicHttp3Logger : public quic::Http3DebugVisitor { |
| 23 | public: |
Renjie Tang | aa3767df | 2019-09-25 23:35:22 | [diff] [blame] | 24 | explicit QuicHttp3Logger(const NetLogWithSource& net_log); |
Renjie Tang | 01447c8 | 2019-09-24 19:32:59 | [diff] [blame] | 25 | |
| 26 | ~QuicHttp3Logger() override; |
| 27 | |
| 28 | // Implementation of Http3DebugVisitor. |
| 29 | void OnPeerControlStreamCreated(quic::QuicStreamId stream_id) override; |
| 30 | void OnPeerQpackEncoderStreamCreated(quic::QuicStreamId stream_id) override; |
| 31 | void OnPeerQpackDecoderStreamCreated(quic::QuicStreamId stream_id) override; |
David Schinazi | 09e9a601 | 2019-10-03 17:37:57 | [diff] [blame] | 32 | void OnSettingsFrameReceived(const quic::SettingsFrame& frame) override; |
| 33 | void OnSettingsFrameSent(const quic::SettingsFrame& frame) override; |
Renjie Tang | 01447c8 | 2019-09-24 19:32:59 | [diff] [blame] | 34 | |
| 35 | private: |
| 36 | NetLogWithSource net_log_; |
| 37 | |
| 38 | DISALLOW_COPY_AND_ASSIGN(QuicHttp3Logger); |
| 39 | }; |
| 40 | } // namespace net |
| 41 | |
| 42 | #endif // NET_QUIC_QUIC_HTTP3_LOGGER_H_ |