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

Unified Diff: net/http/http_log_util.cc

Issue 1932853002: Log urls and headers in BIDIRECTIONAL_STREAM events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 8 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
« no previous file with comments | « net/http/http_log_util.h ('k') | net/log/net_log_event_type_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_log_util.cc
diff --git a/net/http/http_log_util.cc b/net/http/http_log_util.cc
index 8146f0d6b17a55d7a2a56293a4b37dd731872fe0..9d86c4de31db9e2d909fdbf1d7dec48ab97561c2 100644
--- a/net/http/http_log_util.cc
+++ b/net/http/http_log_util.cc
@@ -7,6 +7,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "base/values.h"
#include "net/http/http_auth_challenge_tokenizer.h"
#include "net/http/http_auth_scheme.h"
#include "net/http/http_util.h"
@@ -87,4 +88,18 @@ std::string ElideGoAwayDebugDataForNetLog(NetLogCaptureMode capture_mode,
std::string(" bytes were stripped]");
}
+std::unique_ptr<base::ListValue> ElideSpdyHeaderBlockForNetLog(
+ const SpdyHeaderBlock& headers,
+ NetLogCaptureMode capture_mode) {
+ std::unique_ptr<base::ListValue> headers_list(new base::ListValue());
+ for (SpdyHeaderBlock::const_iterator it = headers.begin();
+ it != headers.end(); ++it) {
+ headers_list->AppendString(
+ it->first.as_string() + ": " +
+ ElideHeaderValueForNetLog(capture_mode, it->first.as_string(),
+ it->second.as_string()));
+ }
+ return headers_list;
+}
+
} // namespace net
« no previous file with comments | « net/http/http_log_util.h ('k') | net/log/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698