Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: net/http/http_log_util.h

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_HTTP_HTTP_LOG_UTIL_ 5 #ifndef NET_HTTP_HTTP_LOG_UTIL_
6 #define NET_HTTP_HTTP_LOG_UTIL_ 6 #define NET_HTTP_HTTP_LOG_UTIL_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
11 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
12 #include "net/log/net_log.h"
13 #include "net/spdy/spdy_header_block.h" 12 #include "net/spdy/spdy_header_block.h"
14 13
15 namespace base { 14 namespace base {
16 class ListValue; 15 class ListValue;
17 } // namespace base 16 } // namespace base
18 17
19 namespace net { 18 namespace net {
20 19
20 class NetLogCaptureMode;
21
21 // Given an HTTP header |header| with value |value|, returns the elided version 22 // Given an HTTP header |header| with value |value|, returns the elided version
22 // of the header value at |log_level|. 23 // of the header value at |log_level|.
23 NET_EXPORT_PRIVATE std::string ElideHeaderValueForNetLog( 24 NET_EXPORT_PRIVATE std::string ElideHeaderValueForNetLog(
24 NetLogCaptureMode capture_mode, 25 NetLogCaptureMode capture_mode,
25 const std::string& header, 26 const std::string& header,
26 const std::string& value); 27 const std::string& value);
27 28
28 // Given an HTTP/2 GOAWAY frame |debug_data|, returns the elided version 29 // Given an HTTP/2 GOAWAY frame |debug_data|, returns the elided version
29 // according to |capture_mode|. 30 // according to |capture_mode|.
30 NET_EXPORT_PRIVATE std::string ElideGoAwayDebugDataForNetLog( 31 NET_EXPORT_PRIVATE std::string ElideGoAwayDebugDataForNetLog(
31 NetLogCaptureMode capture_mode, 32 NetLogCaptureMode capture_mode,
32 base::StringPiece debug_data); 33 base::StringPiece debug_data);
33 34
34 // Given a SpdyHeaderBlock, return its base::ListValue representation. 35 // Given a SpdyHeaderBlock, return its base::ListValue representation.
35 std::unique_ptr<base::ListValue> ElideSpdyHeaderBlockForNetLog( 36 std::unique_ptr<base::ListValue> ElideSpdyHeaderBlockForNetLog(
36 const SpdyHeaderBlock& headers, 37 const SpdyHeaderBlock& headers,
37 NetLogCaptureMode capture_mode); 38 NetLogCaptureMode capture_mode);
38 39
39 } // namespace net 40 } // namespace net
40 41
41 #endif // NET_HTTP_HTTP_LOG_UTIL_ 42 #endif // NET_HTTP_HTTP_LOG_UTIL_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698