OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "net/quic/quic_header_list.h" |
| 6 |
| 7 namespace net { |
| 8 |
| 9 QuicHeaderList::QuicHeaderList() : uncompressed_header_bytes_(0) {} |
| 10 |
| 11 QuicHeaderList::QuicHeaderList(QuicHeaderList&& other) = default; |
| 12 |
| 13 QuicHeaderList::QuicHeaderList(const QuicHeaderList& other) = default; |
| 14 |
| 15 QuicHeaderList& QuicHeaderList::operator=(const QuicHeaderList& other) = |
| 16 default; |
| 17 |
| 18 QuicHeaderList& QuicHeaderList::operator=(QuicHeaderList&& other) = default; |
| 19 |
| 20 QuicHeaderList::~QuicHeaderList() {} |
| 21 |
| 22 void QuicHeaderList::OnHeaderBlockStart() { |
| 23 QUIC_BUG_IF(uncompressed_header_bytes_ != 0) |
| 24 << "OnHeaderBlockStart called more than once!"; |
| 25 } |
| 26 |
| 27 void QuicHeaderList::OnHeader(base::StringPiece name, base::StringPiece value) { |
| 28 header_list_.emplace_back(name.as_string(), value.as_string()); |
| 29 } |
| 30 |
| 31 void QuicHeaderList::OnHeaderBlockEnd(size_t uncompressed_header_bytes) { |
| 32 uncompressed_header_bytes_ = uncompressed_header_bytes; |
| 33 } |
| 34 |
| 35 void QuicHeaderList::Clear() { |
| 36 header_list_.clear(); |
| 37 uncompressed_header_bytes_ = 0; |
| 38 } |
| 39 |
| 40 } // namespace net |
OLD | NEW |