OLD | NEW |
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 #ifndef NET_QUIC_QUIC_HEADER_LIST_H_ | 5 #ifndef NET_QUIC_QUIC_HEADER_LIST_H_ |
6 #define NET_QUIC_QUIC_HEADER_LIST_H_ | 6 #define NET_QUIC_QUIC_HEADER_LIST_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <functional> | 9 #include <functional> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 QuicHeaderList(QuicHeaderList&& other); | 26 QuicHeaderList(QuicHeaderList&& other); |
27 QuicHeaderList(const QuicHeaderList& other); | 27 QuicHeaderList(const QuicHeaderList& other); |
28 QuicHeaderList& operator=(QuicHeaderList&& other); | 28 QuicHeaderList& operator=(QuicHeaderList&& other); |
29 QuicHeaderList& operator=(const QuicHeaderList& other); | 29 QuicHeaderList& operator=(const QuicHeaderList& other); |
30 ~QuicHeaderList() override; | 30 ~QuicHeaderList() override; |
31 | 31 |
32 // From SpdyHeadersHandlerInteface. | 32 // From SpdyHeadersHandlerInteface. |
33 void OnHeaderBlockStart() override; | 33 void OnHeaderBlockStart() override; |
34 void OnHeader(base::StringPiece name, base::StringPiece value) override; | 34 void OnHeader(base::StringPiece name, base::StringPiece value) override; |
35 void OnHeaderBlockEnd(size_t uncompressed_header_bytes) override; | 35 void OnHeaderBlockEnd(size_t uncompressed_header_bytes) override; |
| 36 void OnHeaderBlockEnd(size_t uncompressed_header_bytes, |
| 37 size_t compressed_header_bytes) override; |
36 | 38 |
37 void Clear(); | 39 void Clear(); |
38 | 40 |
39 const_iterator begin() const { return header_list_.begin(); } | 41 const_iterator begin() const { return header_list_.begin(); } |
40 const_iterator end() const { return header_list_.end(); } | 42 const_iterator end() const { return header_list_.end(); } |
41 | 43 |
42 bool empty() const { return header_list_.empty(); } | 44 bool empty() const { return header_list_.empty(); } |
43 size_t uncompressed_header_bytes() const { | 45 size_t uncompressed_header_bytes() const { |
44 return uncompressed_header_bytes_; | 46 return uncompressed_header_bytes_; |
45 } | 47 } |
46 | 48 |
| 49 size_t compressed_header_bytes() const { return compressed_header_bytes_; } |
| 50 |
47 std::string DebugString() const; | 51 std::string DebugString() const; |
48 | 52 |
49 private: | 53 private: |
50 std::deque<std::pair<std::string, std::string>> header_list_; | 54 std::deque<std::pair<std::string, std::string>> header_list_; |
51 size_t uncompressed_header_bytes_; | 55 size_t uncompressed_header_bytes_; |
| 56 size_t compressed_header_bytes_; |
52 }; | 57 }; |
53 | 58 |
54 } // namespace net | 59 } // namespace net |
55 | 60 |
56 #endif // NET_QUIC_QUIC_HEADER_LIST_H_ | 61 #endif // NET_QUIC_QUIC_HEADER_LIST_H_ |
OLD | NEW |