Chromium Code Reviews| Index: net/http/http_log_util.cc |
| diff --git a/net/http/http_log_util.cc b/net/http/http_log_util.cc |
| index 87c2fd99f191cf2c11443611bd6db6d90000686b..500f2209da24b4e5457ff82005ba6dec396622e1 100644 |
| --- a/net/http/http_log_util.cc |
| +++ b/net/http/http_log_util.cc |
| @@ -4,6 +4,7 @@ |
| #include "net/http/http_log_util.h" |
| +#include "base/strings/string_number_conversions.h" |
| #include "base/strings/string_util.h" |
| #include "base/strings/stringprintf.h" |
| #include "net/http/http_auth_challenge_tokenizer.h" |
| @@ -42,7 +43,7 @@ std::string ElideHeaderValueForNetLog(NetLogCaptureMode capture_mode, |
| if (redact_begin == redact_end && |
| !capture_mode.include_cookies_and_credentials()) { |
| - // Note: this logic should be kept in sync with stripCookiesAndLoginInfo in |
| + // Note: this logic should be kept in sync with stripCookieOrLoginInfo in |
| // chrome/browser/resources/net_internals/log_view_painter.js. |
| if (base::EqualsCaseInsensitiveASCII(header, "set-cookie") || |
| @@ -73,4 +74,16 @@ std::string ElideHeaderValueForNetLog(NetLogCaptureMode capture_mode, |
| std::string(redact_end, value.end()); |
| } |
| +std::string ElideGoAwayDebugDataForNetLog(NetLogCaptureMode capture_mode, |
| + base::StringPiece debug_data) { |
| + // Note: this logic should be kept in sync with stripGoAwayDebugData in |
| + // chrome/browser/resources/net_internals/log_view_painter.js. |
| + if (capture_mode.include_cookies_and_credentials()) { |
| + return debug_data.as_string(); |
| + } |
| + |
| + return std::string("[") + base::SizeTToString(debug_data.size()) + |
|
eroman
2015/10/07 17:00:51
[observation (no action needed)] Google has StrCat
Bence
2015/10/30 11:55:26
Acknowledged.
|
| + std::string(" bytes were stripped]"); |
| +} |
| + |
| } // namespace net |