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

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

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: Address Bence comments Created 3 years, 10 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
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_HPACK_DECODER_H_ 5 #ifndef NET_SPDY_HPACK_HPACK_DECODER_H_
6 #define NET_SPDY_HPACK_HPACK_DECODER_H_ 6 #define NET_SPDY_HPACK_HPACK_DECODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // a SpdyHeadersHandlerInterface. 71 // a SpdyHeadersHandlerInterface.
72 const SpdyHeaderBlock& decoded_block() const override; 72 const SpdyHeaderBlock& decoded_block() const override;
73 73
74 void SetHeaderTableDebugVisitor( 74 void SetHeaderTableDebugVisitor(
75 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) 75 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor)
76 override; 76 override;
77 77
78 void set_max_decode_buffer_size_bytes( 78 void set_max_decode_buffer_size_bytes(
79 size_t max_decode_buffer_size_bytes) override; 79 size_t max_decode_buffer_size_bytes) override;
80 80
81 size_t EstimateMemoryUsage() const override;
82
81 private: 83 private:
82 // Adds the header representation to |decoded_block_|, applying the 84 // Adds the header representation to |decoded_block_|, applying the
83 // following rules: 85 // following rules:
84 // - Multiple values of the Cookie header are joined, delmited by '; '. 86 // - Multiple values of the Cookie header are joined, delmited by '; '.
85 // This reconstruction is required to properly handle Cookie crumbling 87 // This reconstruction is required to properly handle Cookie crumbling
86 // (as per section 8.1.2.5 in RFC 7540). 88 // (as per section 8.1.2.5 in RFC 7540).
87 // - Multiple values of other headers are joined and delimited by '\0'. 89 // - Multiple values of other headers are joined and delimited by '\0'.
88 // Note that this may be too accomodating, as the sender's HTTP2 layer 90 // Note that this may be too accomodating, as the sender's HTTP2 layer
89 // should have already joined and delimited these values. 91 // should have already joined and delimited these values.
90 // 92 //
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 147
146 // Saved value of --gfe2_reloadable_flag_add_hpack_incremental_decode. 148 // Saved value of --gfe2_reloadable_flag_add_hpack_incremental_decode.
147 bool incremental_decode_; 149 bool incremental_decode_;
148 150
149 DISALLOW_COPY_AND_ASSIGN(HpackDecoder); 151 DISALLOW_COPY_AND_ASSIGN(HpackDecoder);
150 }; 152 };
151 153
152 } // namespace net 154 } // namespace net
153 155
154 #endif // NET_SPDY_HPACK_HPACK_DECODER_H_ 156 #endif // NET_SPDY_HPACK_HPACK_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698