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

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

Issue 1989003002: QUIC - add instrumentation to HPACK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase-update Created 4 years, 7 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/quic/quic_headers_stream_test.cc ('k') | net/spdy/hpack/hpack_encoder.h » ('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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // header (which has been incrementally reconstructed) and notify 66 // header (which has been incrementally reconstructed) and notify
67 // the visitor that the block is finished. 67 // the visitor that the block is finished.
68 bool HandleControlFrameHeadersComplete(size_t* compressed_len); 68 bool HandleControlFrameHeadersComplete(size_t* compressed_len);
69 69
70 // Accessor for the most recently decoded headers block. Valid until the next 70 // Accessor for the most recently decoded headers block. Valid until the next
71 // call to HandleControlFrameHeadersData(). 71 // call to HandleControlFrameHeadersData().
72 // TODO(birenroy): Remove this method when all users of HpackDecoder specify 72 // TODO(birenroy): Remove this method when all users of HpackDecoder specify
73 // a SpdyHeadersHandlerInterface. 73 // a SpdyHeadersHandlerInterface.
74 const SpdyHeaderBlock& decoded_block() { return decoded_block_; } 74 const SpdyHeaderBlock& decoded_block() { return decoded_block_; }
75 75
76 void SetHeaderTableDebugVisitor(
77 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) {
78 header_table_.set_debug_visitor(std::move(visitor));
79 }
80
76 private: 81 private:
77 // Adds the header representation to |decoded_block_|, applying the 82 // Adds the header representation to |decoded_block_|, applying the
78 // following rules: 83 // following rules:
79 // - Multiple values of the Cookie header are joined, delmited by '; '. 84 // - Multiple values of the Cookie header are joined, delmited by '; '.
80 // This reconstruction is required to properly handle Cookie crumbling 85 // This reconstruction is required to properly handle Cookie crumbling
81 // (as per section 8.1.2.5 in RFC 7540). 86 // (as per section 8.1.2.5 in RFC 7540).
82 // - Multiple values of other headers are joined and delimited by '\0'. 87 // - Multiple values of other headers are joined and delimited by '\0'.
83 // Note that this may be too accomodating, as the sender's HTTP2 layer 88 // Note that this may be too accomodating, as the sender's HTTP2 layer
84 // should have already joined and delimited these values. 89 // should have already joined and delimited these values.
85 // 90 //
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 bool DecodeNextStringLiteral(HpackInputStream* input_stream, 136 bool DecodeNextStringLiteral(HpackInputStream* input_stream,
132 bool is_header_key, // As distinct from a value. 137 bool is_header_key, // As distinct from a value.
133 base::StringPiece* output); 138 base::StringPiece* output);
134 139
135 DISALLOW_COPY_AND_ASSIGN(HpackDecoder); 140 DISALLOW_COPY_AND_ASSIGN(HpackDecoder);
136 }; 141 };
137 142
138 } // namespace net 143 } // namespace net
139 144
140 #endif // NET_SPDY_HPACK_DECODER_H_ 145 #endif // NET_SPDY_HPACK_DECODER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_headers_stream_test.cc ('k') | net/spdy/hpack/hpack_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698