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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_header_list.h" 5 #include "net/quic/quic_header_list.h"
6 6
7 using std::string;
8
7 namespace net { 9 namespace net {
8 10
9 QuicHeaderList::QuicHeaderList() : uncompressed_header_bytes_(0) {} 11 QuicHeaderList::QuicHeaderList() : uncompressed_header_bytes_(0) {}
10 12
11 QuicHeaderList::QuicHeaderList(QuicHeaderList&& other) = default; 13 QuicHeaderList::QuicHeaderList(QuicHeaderList&& other) = default;
12 14
13 QuicHeaderList::QuicHeaderList(const QuicHeaderList& other) = default; 15 QuicHeaderList::QuicHeaderList(const QuicHeaderList& other) = default;
14 16
15 QuicHeaderList& QuicHeaderList::operator=(const QuicHeaderList& other) = 17 QuicHeaderList& QuicHeaderList::operator=(const QuicHeaderList& other) =
16 default; 18 default;
(...skipping 13 matching lines...) Expand all
30 32
31 void QuicHeaderList::OnHeaderBlockEnd(size_t uncompressed_header_bytes) { 33 void QuicHeaderList::OnHeaderBlockEnd(size_t uncompressed_header_bytes) {
32 uncompressed_header_bytes_ = uncompressed_header_bytes; 34 uncompressed_header_bytes_ = uncompressed_header_bytes;
33 } 35 }
34 36
35 void QuicHeaderList::Clear() { 37 void QuicHeaderList::Clear() {
36 header_list_.clear(); 38 header_list_.clear();
37 uncompressed_header_bytes_ = 0; 39 uncompressed_header_bytes_ = 0;
38 } 40 }
39 41
42 string QuicHeaderList::DebugString() const {
43 string s = "{ ";
44 for (const auto& p : *this) {
45 s.append(p.first + "=" + p.second + ", ");
46 }
47 s.append("}");
48 return s;
49 }
50
40 } // namespace net 51 } // namespace net
OLDNEW
« 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