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

Unified Diff: net/spdy/hpack/hpack_encoder.cc

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/hpack/hpack_encoder.h ('k') | net/spdy/hpack/hpack_huffman_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..de04d74fc15fd841a11695399480d5811f0799e2 100644
--- a/net/spdy/hpack/hpack_encoder.cc
+++ b/net/spdy/hpack/hpack_encoder.cc
@@ -13,6 +13,7 @@
#include "net/spdy/hpack/hpack_header_table.h"
#include "net/spdy/hpack/hpack_huffman_table.h"
#include "net/spdy/hpack/hpack_output_stream.h"
+#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
namespace net {
@@ -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 SpdyEstimateMemoryUsage(header_table_) +
+ SpdyEstimateMemoryUsage(output_stream_);
+}
+
void HpackEncoder::EncodeRepresentations(RepresentationIterator* iter,
string* output) {
MaybeEmitTableSize();
« no previous file with comments | « net/spdy/hpack/hpack_encoder.h ('k') | net/spdy/hpack/hpack_huffman_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698