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

Side by Side Diff: net/spdy/hpack/hpack_decoder.h

Issue 1914193002: Implements incremental decode in HPACK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/spdy/hpack/hpack_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // If non-NULL, handles decoded headers. 105 // If non-NULL, handles decoded headers.
106 SpdyHeadersHandlerInterface* handler_; 106 SpdyHeadersHandlerInterface* handler_;
107 size_t total_header_bytes_; 107 size_t total_header_bytes_;
108 108
109 // Flag to keep track of having seen a regular header field. 109 // Flag to keep track of having seen a regular header field.
110 bool regular_header_seen_; 110 bool regular_header_seen_;
111 111
112 // Flag to keep track of having seen the header block start. 112 // Flag to keep track of having seen the header block start.
113 bool header_block_started_; 113 bool header_block_started_;
114 114
115 // Total bytes have been removed from headers_block_buffer_.
116 // Its value is updated during incremental decoding.
117 uint32_t total_parsed_bytes_;
118
115 // Handlers for decoding HPACK opcodes and header representations 119 // Handlers for decoding HPACK opcodes and header representations
116 // (or parts thereof). These methods return true on success and 120 // (or parts thereof). These methods return true on success and
117 // false on error. 121 // false on error.
122 bool DecodeNextOpcodeWrapper(HpackInputStream* input_stream);
118 bool DecodeNextOpcode(HpackInputStream* input_stream); 123 bool DecodeNextOpcode(HpackInputStream* input_stream);
119 bool DecodeNextHeaderTableSizeUpdate(HpackInputStream* input_stream); 124 bool DecodeNextHeaderTableSizeUpdate(HpackInputStream* input_stream);
120 bool DecodeNextIndexedHeader(HpackInputStream* input_stream); 125 bool DecodeNextIndexedHeader(HpackInputStream* input_stream);
121 bool DecodeNextLiteralHeader(HpackInputStream* input_stream, 126 bool DecodeNextLiteralHeader(HpackInputStream* input_stream,
122 bool should_index); 127 bool should_index);
123 bool DecodeNextName(HpackInputStream* input_stream, 128 bool DecodeNextName(HpackInputStream* input_stream,
124 base::StringPiece* next_name); 129 base::StringPiece* next_name);
125 bool DecodeNextStringLiteral(HpackInputStream* input_stream, 130 bool DecodeNextStringLiteral(HpackInputStream* input_stream,
126 bool is_header_key, // As distinct from a value. 131 bool is_header_key, // As distinct from a value.
127 base::StringPiece* output); 132 base::StringPiece* output);
128 133
129 DISALLOW_COPY_AND_ASSIGN(HpackDecoder); 134 DISALLOW_COPY_AND_ASSIGN(HpackDecoder);
130 }; 135 };
131 136
132 } // namespace net 137 } // namespace net
133 138
134 #endif // NET_SPDY_HPACK_DECODER_H_ 139 #endif // NET_SPDY_HPACK_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | net/spdy/hpack/hpack_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698