• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The Chromium Authors
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_SPDY_SPDY_LOG_UTIL_H_
6 #define NET_SPDY_SPDY_LOG_UTIL_H_
7 
8 #include "base/strings/string_piece.h"
9 #include "base/values.h"
10 #include "net/base/net_export.h"
11 #include "net/http/http_log_util.h"
12 #include "net/log/net_log.h"
13 #include "net/log/net_log_capture_mode.h"
14 #include "net/third_party/quiche/src/quiche/spdy/core/http2_header_block.h"
15 
16 namespace net {
17 
18 // Given an HTTP/2 GOAWAY frame |debug_data|, returns the elided version
19 // according to |capture_mode|.
20 NET_EXPORT_PRIVATE base::Value ElideGoAwayDebugDataForNetLog(
21     NetLogCaptureMode capture_mode,
22     base::StringPiece debug_data);
23 
24 // Given a spdy::Http2HeaderBlock, return its base::Value::List representation.
25 NET_EXPORT_PRIVATE base::Value::List ElideHttp2HeaderBlockForNetLog(
26     const spdy::Http2HeaderBlock& headers,
27     NetLogCaptureMode capture_mode);
28 
29 // Converts a spdy::Http2HeaderBlock into NetLog event parameters.
30 NET_EXPORT_PRIVATE base::Value::Dict Http2HeaderBlockNetLogParams(
31     const spdy::Http2HeaderBlock* headers,
32     NetLogCaptureMode capture_mode);
33 
34 }  // namespace net
35 
36 #endif  // NET_SPDY_SPDY_LOG_UTIL_H_
37