OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TOOLS_BALSA_BALSA_FRAME_H_ | 5 #ifndef NET_TOOLS_BALSA_BALSA_FRAME_H_ |
6 #define NET_TOOLS_BALSA_BALSA_FRAME_H_ | 6 #define NET_TOOLS_BALSA_BALSA_FRAME_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 return false; | 195 return false; |
196 } | 196 } |
197 | 197 |
198 inline bool HeaderFramingMayBeFound() const { | 198 inline bool HeaderFramingMayBeFound() const { |
199 return term_chars_ != 0; | 199 return term_chars_ != 0; |
200 } | 200 } |
201 | 201 |
202 private: | 202 private: |
203 class DoNothingBalsaVisitor : public BalsaVisitorInterface { | 203 class DoNothingBalsaVisitor : public BalsaVisitorInterface { |
204 virtual void ProcessBodyInput(const char *input, size_t size) OVERRIDE {} | 204 virtual void ProcessBodyInput(const char *input, size_t size) override {} |
205 virtual void ProcessBodyData(const char *input, size_t size) OVERRIDE {} | 205 virtual void ProcessBodyData(const char *input, size_t size) override {} |
206 virtual void ProcessHeaderInput(const char *input, size_t size) OVERRIDE {} | 206 virtual void ProcessHeaderInput(const char *input, size_t size) override {} |
207 virtual void ProcessTrailerInput(const char *input, size_t size) OVERRIDE {} | 207 virtual void ProcessTrailerInput(const char *input, size_t size) override {} |
208 virtual void ProcessHeaders(const BalsaHeaders& headers) OVERRIDE {} | 208 virtual void ProcessHeaders(const BalsaHeaders& headers) override {} |
209 virtual void ProcessRequestFirstLine(const char* line_input, | 209 virtual void ProcessRequestFirstLine(const char* line_input, |
210 size_t line_length, | 210 size_t line_length, |
211 const char* method_input, | 211 const char* method_input, |
212 size_t method_length, | 212 size_t method_length, |
213 const char* request_uri_input, | 213 const char* request_uri_input, |
214 size_t request_uri_length, | 214 size_t request_uri_length, |
215 const char* version_input, | 215 const char* version_input, |
216 size_t version_length) OVERRIDE {} | 216 size_t version_length) override {} |
217 virtual void ProcessResponseFirstLine(const char *line_input, | 217 virtual void ProcessResponseFirstLine(const char *line_input, |
218 size_t line_length, | 218 size_t line_length, |
219 const char *version_input, | 219 const char *version_input, |
220 size_t version_length, | 220 size_t version_length, |
221 const char *status_input, | 221 const char *status_input, |
222 size_t status_length, | 222 size_t status_length, |
223 const char *reason_input, | 223 const char *reason_input, |
224 size_t reason_length) OVERRIDE {} | 224 size_t reason_length) override {} |
225 virtual void ProcessChunkLength(size_t chunk_length) OVERRIDE {} | 225 virtual void ProcessChunkLength(size_t chunk_length) override {} |
226 virtual void ProcessChunkExtensions(const char *input, | 226 virtual void ProcessChunkExtensions(const char *input, |
227 size_t size) OVERRIDE {} | 227 size_t size) override {} |
228 virtual void HeaderDone() OVERRIDE {} | 228 virtual void HeaderDone() override {} |
229 virtual void MessageDone() OVERRIDE {} | 229 virtual void MessageDone() override {} |
230 virtual void HandleHeaderError(BalsaFrame* framer) OVERRIDE {} | 230 virtual void HandleHeaderError(BalsaFrame* framer) override {} |
231 virtual void HandleHeaderWarning(BalsaFrame* framer) OVERRIDE {} | 231 virtual void HandleHeaderWarning(BalsaFrame* framer) override {} |
232 virtual void HandleChunkingError(BalsaFrame* framer) OVERRIDE {} | 232 virtual void HandleChunkingError(BalsaFrame* framer) override {} |
233 virtual void HandleBodyError(BalsaFrame* framer) OVERRIDE {} | 233 virtual void HandleBodyError(BalsaFrame* framer) override {} |
234 }; | 234 }; |
235 | 235 |
236 bool last_char_was_slash_r_; | 236 bool last_char_was_slash_r_; |
237 bool saw_non_newline_char_; | 237 bool saw_non_newline_char_; |
238 bool start_was_space_; | 238 bool start_was_space_; |
239 bool chunk_length_character_extracted_; | 239 bool chunk_length_character_extracted_; |
240 bool is_request_; // This is not reset in Reset() | 240 bool is_request_; // This is not reset in Reset() |
241 bool request_was_head_; // This is not reset in Reset() | 241 bool request_was_head_; // This is not reset in Reset() |
242 size_t max_header_length_; // This is not reset in Reset() | 242 size_t max_header_length_; // This is not reset in Reset() |
243 size_t max_request_uri_length_; // This is not reset in Reset() | 243 size_t max_request_uri_length_; // This is not reset in Reset() |
(...skipping 10 matching lines...) Expand all Loading... |
254 Lines lines_; | 254 Lines lines_; |
255 | 255 |
256 BalsaHeaders* headers_; // This is not reset to NULL in Reset(). | 256 BalsaHeaders* headers_; // This is not reset to NULL in Reset(). |
257 DoNothingBalsaVisitor do_nothing_visitor_; | 257 DoNothingBalsaVisitor do_nothing_visitor_; |
258 }; | 258 }; |
259 | 259 |
260 } // namespace net | 260 } // namespace net |
261 | 261 |
262 #endif // NET_TOOLS_BALSA_BALSA_FRAME_H_ | 262 #endif // NET_TOOLS_BALSA_BALSA_FRAME_H_ |
263 | 263 |
OLD | NEW |