1 // Copyright 2014 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_HTTP_HTTP_LOG_UTIL_H_ 6 #define NET_HTTP_HTTP_LOG_UTIL_H_ 7 8 #include <string> 9 10 #include "net/base/net_export.h" 11 #include "net/log/net_log_capture_mode.h" 12 #include "net/log/net_log_event_type.h" 13 14 namespace net { 15 16 class NetLogWithSource; 17 class HttpResponseHeaders; 18 class HttpRequestHeaders; 19 20 // Given an HTTP header |header| with value |value|, returns the elided version 21 // of the header value at |log_level|. 22 NET_EXPORT_PRIVATE std::string ElideHeaderValueForNetLog( 23 NetLogCaptureMode capture_mode, 24 const std::string& header, 25 const std::string& value); 26 27 NET_EXPORT void NetLogResponseHeaders(const NetLogWithSource& net_log, 28 NetLogEventType type, 29 const HttpResponseHeaders* headers); 30 31 NET_EXPORT void NetLogRequestHeaders(const NetLogWithSource& net_log, 32 NetLogEventType type, 33 const std::string& request_line, 34 const HttpRequestHeaders* headers); 35 36 } // namespace net 37 38 #endif // NET_HTTP_HTTP_LOG_UTIL_H_ 39