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

Side by Side Diff: net/spdy/header_coalescer.h

Issue 2028473003: Move header-ordering validation from hpack decoder to header validator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix lint errors. Created 4 years, 6 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 | « net/spdy/buffered_spdy_framer.cc ('k') | net/spdy/header_coalescer.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 (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_SPDY_HEADER_COALESCER_H_ 5 #ifndef NET_SPDY_HEADER_COALESCER_H_
6 #define NET_SPDY_HEADER_COALESCER_H_ 6 #define NET_SPDY_HEADER_COALESCER_H_
7 7
8 #include "net/base/net_export.h" 8 #include "net/base/net_export.h"
9 #include "net/spdy/spdy_header_block.h" 9 #include "net/spdy/spdy_header_block.h"
10 #include "net/spdy/spdy_headers_handler_interface.h" 10 #include "net/spdy/spdy_headers_handler_interface.h"
11 #include "net/spdy/spdy_protocol.h"
11 12
12 namespace net { 13 namespace net {
13 14
14 class NET_EXPORT_PRIVATE HeaderCoalescer : public SpdyHeadersHandlerInterface { 15 class NET_EXPORT_PRIVATE HeaderCoalescer : public SpdyHeadersHandlerInterface {
15 public: 16 public:
16 HeaderCoalescer() {} 17 explicit HeaderCoalescer(const SpdyMajorVersion& protocol_version)
18 : protocol_version_(protocol_version) {}
17 19
18 void OnHeaderBlockStart() override {} 20 void OnHeaderBlockStart() override {}
19 21
20 void OnHeader(base::StringPiece key, base::StringPiece value) override; 22 void OnHeader(base::StringPiece key, base::StringPiece value) override;
21 23
22 void OnHeaderBlockEnd(size_t uncompressed_header_bytes) override {} 24 void OnHeaderBlockEnd(size_t uncompressed_header_bytes) override {}
23 25
24 const SpdyHeaderBlock& headers() const { return headers_; } 26 const SpdyHeaderBlock& headers() const { return headers_; }
25 bool error_seen() const { return error_seen_; } 27 bool error_seen() const { return error_seen_; }
26 28
27 private: 29 private:
28 SpdyHeaderBlock headers_; 30 SpdyHeaderBlock headers_;
29 size_t header_list_size_ = 0; 31 size_t header_list_size_ = 0;
30 bool error_seen_ = false; 32 bool error_seen_ = false;
33 bool regular_header_seen_ = false;
34 SpdyMajorVersion protocol_version_;
31 }; 35 };
32 36
33 } // namespace net 37 } // namespace net
34 38
35 #endif // NET_SPDY_HEADER_COALESCER_H_ 39 #endif // NET_SPDY_HEADER_COALESCER_H_
OLDNEW
« no previous file with comments | « net/spdy/buffered_spdy_framer.cc ('k') | net/spdy/header_coalescer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698