Chromium Code Reviews| 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..dfa10aaf96559f04eb49ac730e16c7b7d2745bdf |
| --- /dev/null |
| +++ b/net/quic/quic_header_list.cc |
| @@ -0,0 +1,38 @@ |
| +// 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" |
|
ramant (doing other things)
2016/04/11 18:11:57
Please add a blank line between line#3 and line#4
Zhongyi Shi
2016/04/11 18:27:31
done in the final.
|
| + |
| +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 |