OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "net/spdy/hpack/hpack_decoder3.h" | 5 #include "net/spdy/core/hpack/hpack_decoder3.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/http2/decoder/decode_buffer.h" | 8 #include "net/http2/decoder/decode_buffer.h" |
9 #include "net/http2/decoder/decode_status.h" | 9 #include "net/http2/decoder/decode_status.h" |
| 10 #include "net/spdy/chromium/spdy_flags.h" |
10 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h" | 11 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h" |
11 #include "net/spdy/spdy_flags.h" | |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 namespace { | 14 namespace { |
15 const size_t kMaxDecodeBufferSizeBytes = 32 * 1024; // 32 KB | 15 const size_t kMaxDecodeBufferSizeBytes = 32 * 1024; // 32 KB |
16 } // namespace | 16 } // namespace |
17 | 17 |
18 HpackDecoder3::HpackDecoder3() | 18 HpackDecoder3::HpackDecoder3() |
19 : hpack_decoder_(&listener_adapter_, kMaxDecodeBufferSizeBytes), | 19 : hpack_decoder_(&listener_adapter_, kMaxDecodeBufferSizeBytes), |
20 max_decode_buffer_size_bytes_(kMaxDecodeBufferSizeBytes), | 20 max_decode_buffer_size_bytes_(kMaxDecodeBufferSizeBytes), |
21 header_block_started_(false) {} | 21 header_block_started_(false) {} |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 << ", insert_count=" << insert_count | 189 << ", insert_count=" << insert_count |
190 << ", time_added=" << time_added; | 190 << ", time_added=" << time_added; |
191 if (visitor_ != nullptr) { | 191 if (visitor_ != nullptr) { |
192 HpackEntry entry(sp.name, sp.value, /*is_static*/ false, insert_count); | 192 HpackEntry entry(sp.name, sp.value, /*is_static*/ false, insert_count); |
193 entry.set_time_added(time_added); | 193 entry.set_time_added(time_added); |
194 visitor_->OnUseEntry(entry); | 194 visitor_->OnUseEntry(entry); |
195 } | 195 } |
196 } | 196 } |
197 | 197 |
198 } // namespace net | 198 } // namespace net |
OLD | NEW |