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

Unified Diff: net/spdy/spdy_header_block.cc

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: address bnc comments Created 3 years, 11 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
Index: net/spdy/spdy_header_block.cc
diff --git a/net/spdy/spdy_header_block.cc b/net/spdy/spdy_header_block.cc
index 6cbd6ba645c4585a3126099322effb3f9525c968..9fb62a9c1ea3058b88d0f38e37fee6fd76082f51 100644
--- a/net/spdy/spdy_header_block.cc
+++ b/net/spdy/spdy_header_block.cc
@@ -299,6 +299,10 @@ void SpdyHeaderBlock::AppendValueOrAddHeader(const StringPiece key,
iter->second.Append(GetStorage()->Write(value));
}
+size_t SpdyHeaderBlock::EstimateMemoryUsage() const {
DmitrySkiba 2017/02/02 18:16:27 I think block_ should also be estimated.
xunjieli 2017/02/03 22:25:09 I don't think EMU has support for linked_hash_map?
+ return bytes_allocated();
+}
+
void SpdyHeaderBlock::AppendHeader(const StringPiece key,
const StringPiece value) {
auto storage = GetStorage();

Powered by Google App Engine
This is Rietveld 408576698