http_log_util.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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
  3. // found in the LICENSE file.
  4. #ifndef NET_HTTP_HTTP_LOG_UTIL_H_
  5. #define NET_HTTP_HTTP_LOG_UTIL_H_
  6. #include <string>
  7. #include "net/base/net_export.h"
  8. #include "net/log/net_log_capture_mode.h"
  9. #include "net/log/net_log_event_type.h"
  10. namespace net {
  11. class NetLogWithSource;
  12. class HttpResponseHeaders;
  13. class HttpRequestHeaders;
  14. // Given an HTTP header |header| with value |value|, returns the elided version
  15. // of the header value at |log_level|.
  16. NET_EXPORT_PRIVATE std::string ElideHeaderValueForNetLog(
  17. NetLogCaptureMode capture_mode,
  18. const std::string& header,
  19. const std::string& value);
  20. NET_EXPORT void NetLogResponseHeaders(const NetLogWithSource& net_log,
  21. NetLogEventType type,
  22. const HttpResponseHeaders* headers);
  23. NET_EXPORT void NetLogRequestHeaders(const NetLogWithSource& net_log,
  24. NetLogEventType type,
  25. const std::string& request_line,
  26. const HttpRequestHeaders* headers);
  27. } // namespace net
  28. #endif // NET_HTTP_HTTP_LOG_UTIL_H_