| Index: net/spdy/hpack/hpack_encoder.cc
|
| diff --git a/net/spdy/hpack/hpack_encoder.cc b/net/spdy/hpack/hpack_encoder.cc
|
| index 0ec5e8f67d4a3cdabc71b07f0c86dbeca509a343..04bdaea10a0c811f3aa4685d14a6d71335c581cc 100644
|
| --- a/net/spdy/hpack/hpack_encoder.cc
|
| +++ b/net/spdy/hpack/hpack_encoder.cc
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "base/trace_event/memory_usage_estimator.h"
|
| #include "net/spdy/hpack/hpack_constants.h"
|
| #include "net/spdy/hpack/hpack_header_table.h"
|
| #include "net/spdy/hpack/hpack_huffman_table.h"
|
| @@ -132,6 +133,12 @@ void HpackEncoder::ApplyHeaderTableSizeSetting(size_t size_setting) {
|
| should_emit_table_size_ = true;
|
| }
|
|
|
| +size_t HpackEncoder::EstimateMemoryUsage() const {
|
| + // |huffman_table_| is a singleton. It's accounted for in spdy_session_pool.cc
|
| + return base::trace_event::EstimateMemoryUsage(header_table_) +
|
| + base::trace_event::EstimateMemoryUsage(output_stream_);
|
| +}
|
| +
|
| void HpackEncoder::EncodeRepresentations(RepresentationIterator* iter,
|
| string* output) {
|
| MaybeEmitTableSize();
|
|
|