blob: 8a1b68620ae30e7f9f887d26e7d426808c70675b [file] [log] [blame]
Renjie Tang01447c82019-09-24 19:32:591// 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
18namespace net {
19
20// This class is a debug visitor of a quic::QuicSpdySession which logs events
Bence Béky230fdd92019-10-10 02:32:0321// to |net_log| and records histograms.
Renjie Tang01447c82019-09-24 19:32:5922class NET_EXPORT_PRIVATE QuicHttp3Logger : public quic::Http3DebugVisitor {
23 public:
Renjie Tangaa3767df2019-09-25 23:35:2224 explicit QuicHttp3Logger(const NetLogWithSource& net_log);
Renjie Tang01447c82019-09-24 19:32:5925
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 Schinazi09e9a6012019-10-03 17:37:5732 void OnSettingsFrameReceived(const quic::SettingsFrame& frame) override;
33 void OnSettingsFrameSent(const quic::SettingsFrame& frame) override;
Renjie Tang01447c82019-09-24 19:32:5934
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_