| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SPDY_HPACK_DECODER_H_ | 5 #ifndef NET_SPDY_HPACK_DECODER_H_ |
| 6 #define NET_SPDY_HPACK_DECODER_H_ | 6 #define NET_SPDY_HPACK_DECODER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 std::string headers_block_buffer_; | 107 std::string headers_block_buffer_; |
| 108 SpdyHeaderBlock decoded_block_; | 108 SpdyHeaderBlock decoded_block_; |
| 109 | 109 |
| 110 // Scratch space for storing decoded literals. | 110 // Scratch space for storing decoded literals. |
| 111 std::string key_buffer_, value_buffer_; | 111 std::string key_buffer_, value_buffer_; |
| 112 | 112 |
| 113 // If non-NULL, handles decoded headers. | 113 // If non-NULL, handles decoded headers. |
| 114 SpdyHeadersHandlerInterface* handler_; | 114 SpdyHeadersHandlerInterface* handler_; |
| 115 size_t total_header_bytes_; | 115 size_t total_header_bytes_; |
| 116 | 116 |
| 117 // Flag to keep track of having seen a regular header field. | |
| 118 bool regular_header_seen_; | |
| 119 | |
| 120 // Flag to keep track of having seen the header block start. | 117 // Flag to keep track of having seen the header block start. |
| 121 bool header_block_started_; | 118 bool header_block_started_; |
| 122 | 119 |
| 123 // Total bytes have been removed from headers_block_buffer_. | 120 // Total bytes have been removed from headers_block_buffer_. |
| 124 // Its value is updated during incremental decoding. | 121 // Its value is updated during incremental decoding. |
| 125 uint32_t total_parsed_bytes_; | 122 uint32_t total_parsed_bytes_; |
| 126 | 123 |
| 127 // How much encoded data this decoder is willing to buffer. | 124 // How much encoded data this decoder is willing to buffer. |
| 128 // Defaults to 256 KB. | 125 // Defaults to 256 KB. |
| 129 size_t max_decode_buffer_size_bytes_ = kMaxDecodeBufferSize; | 126 size_t max_decode_buffer_size_bytes_ = kMaxDecodeBufferSize; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 143 bool DecodeNextStringLiteral(HpackInputStream* input_stream, | 140 bool DecodeNextStringLiteral(HpackInputStream* input_stream, |
| 144 bool is_header_key, // As distinct from a value. | 141 bool is_header_key, // As distinct from a value. |
| 145 base::StringPiece* output); | 142 base::StringPiece* output); |
| 146 | 143 |
| 147 DISALLOW_COPY_AND_ASSIGN(HpackDecoder); | 144 DISALLOW_COPY_AND_ASSIGN(HpackDecoder); |
| 148 }; | 145 }; |
| 149 | 146 |
| 150 } // namespace net | 147 } // namespace net |
| 151 | 148 |
| 152 #endif // NET_SPDY_HPACK_DECODER_H_ | 149 #endif // NET_SPDY_HPACK_DECODER_H_ |
| OLD | NEW |