| Index: net/spdy/hpack/hpack_decoder.cc
|
| diff --git a/net/spdy/hpack/hpack_decoder.cc b/net/spdy/hpack/hpack_decoder.cc
|
| index 575a5c19b715a25d0989b9048e808b137da3231c..78e1f18110747da703ba45e58df4fcf57cfa3f55 100644
|
| --- a/net/spdy/hpack/hpack_decoder.cc
|
| +++ b/net/spdy/hpack/hpack_decoder.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/logging.h"
|
| #include "net/spdy/hpack/hpack_constants.h"
|
| #include "net/spdy/hpack/hpack_entry.h"
|
| +#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
|
| #include "net/spdy/spdy_flags.h"
|
|
|
| namespace net {
|
| @@ -116,6 +117,14 @@ void HpackDecoder::set_max_decode_buffer_size_bytes(
|
| max_decode_buffer_size_bytes_ = max_decode_buffer_size_bytes;
|
| }
|
|
|
| +size_t HpackDecoder::EstimateMemoryUsage() const {
|
| + return SpdyEstimateMemoryUsage(header_table_) +
|
| + SpdyEstimateMemoryUsage(headers_block_buffer_) +
|
| + SpdyEstimateMemoryUsage(decoded_block_) +
|
| + SpdyEstimateMemoryUsage(key_buffer_) +
|
| + SpdyEstimateMemoryUsage(value_buffer_);
|
| +}
|
| +
|
| bool HpackDecoder::HandleHeaderRepresentation(StringPiece name,
|
| StringPiece value) {
|
| size_updates_allowed_ = false;
|
|
|