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

Unified Diff: net/quic/quic_header_list.cc

Issue 1877703002: Landing Recent QUIC changes until 4/8/2016 17:17 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git sync 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
new file mode 100644
index 0000000000000000000000000000000000000000..2edb3438d75a52216f65f5b51c5d2559a3bff5c6
--- /dev/null
+++ b/net/quic/quic_header_list.cc
@@ -0,0 +1,40 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/quic/quic_header_list.h"
+
+namespace net {
+
+QuicHeaderList::QuicHeaderList() : uncompressed_header_bytes_(0) {}
+
+QuicHeaderList::QuicHeaderList(QuicHeaderList&& other) = default;
+
+QuicHeaderList::QuicHeaderList(const QuicHeaderList& other) = default;
+
+QuicHeaderList& QuicHeaderList::operator=(const QuicHeaderList& other) =
+ default;
+
+QuicHeaderList& QuicHeaderList::operator=(QuicHeaderList&& other) = default;
+
+QuicHeaderList::~QuicHeaderList() {}
+
+void QuicHeaderList::OnHeaderBlockStart() {
+ QUIC_BUG_IF(uncompressed_header_bytes_ != 0)
+ << "OnHeaderBlockStart called more than once!";
+}
+
+void QuicHeaderList::OnHeader(base::StringPiece name, base::StringPiece value) {
+ header_list_.emplace_back(name.as_string(), value.as_string());
+}
+
+void QuicHeaderList::OnHeaderBlockEnd(size_t uncompressed_header_bytes) {
+ uncompressed_header_bytes_ = uncompressed_header_bytes;
+}
+
+void QuicHeaderList::Clear() {
+ header_list_.clear();
+ uncompressed_header_bytes_ = 0;
+}
+
+} // 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