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

Unified Diff: net/quic/quic_header_list.cc

Issue 1907683002: Adds a DebugString() method to QuicHeaderList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/quic/quic_header_list.h ('k') | net/quic/quic_header_list_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_header_list.cc
diff --git a/net/quic/quic_header_list.cc b/net/quic/quic_header_list.cc
index 2edb3438d75a52216f65f5b51c5d2559a3bff5c6..4d2f3f64bab022db0314ecae657d68747c94fbd1 100644
--- a/net/quic/quic_header_list.cc
+++ b/net/quic/quic_header_list.cc
@@ -4,6 +4,8 @@
#include "net/quic/quic_header_list.h"
+using std::string;
+
namespace net {
QuicHeaderList::QuicHeaderList() : uncompressed_header_bytes_(0) {}
@@ -37,4 +39,13 @@ void QuicHeaderList::Clear() {
uncompressed_header_bytes_ = 0;
}
+string QuicHeaderList::DebugString() const {
+ string s = "{ ";
+ for (const auto& p : *this) {
+ s.append(p.first + "=" + p.second + ", ");
+ }
+ s.append("}");
+ return s;
+}
+
} // namespace net
« no previous file with comments | « net/quic/quic_header_list.h ('k') | net/quic/quic_header_list_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698