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

Unified Diff: net/http/http_log_util.cc

Issue 1360253002: Log GOAWAY frame debug data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize |goaway_count_|. Created 5 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 side-by-side diff with in-line comments
Download patch
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..6595e4761582267385afb4db7985795d767a3634 100644
--- a/net/http/http_log_util.cc
+++ b/net/http/http_log_util.cc
@@ -42,7 +42,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 +73,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 base::StringPrintf("[%ld bytes were stripped]",
+ static_cast<long>(debug_data.size()));
eroman 2015/10/06 17:19:41 Rather than casting, you can use the format specif
Bence 2015/10/07 15:18:27 Done.
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698