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

Unified Diff: net/http2/hpack/decoder/hpack_whole_entry_buffer.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/http2/hpack/decoder/hpack_whole_entry_buffer.h ('k') | net/http2/hpack/decoder/http2_hpack_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http2/hpack/decoder/hpack_whole_entry_buffer.cc
diff --git a/net/http2/hpack/decoder/hpack_whole_entry_buffer.cc b/net/http2/hpack/decoder/hpack_whole_entry_buffer.cc
index 8bb212f40aaea1a96eb983ac0cfa4ec3e0f0d897..429938fda7a2e93e0b9870a6777a29c392bbfcb8 100644
--- a/net/http2/hpack/decoder/hpack_whole_entry_buffer.cc
+++ b/net/http2/hpack/decoder/hpack_whole_entry_buffer.cc
@@ -5,6 +5,7 @@
#include "net/http2/hpack/decoder/hpack_whole_entry_buffer.h"
#include "base/logging.h"
+#include "base/trace_event/memory_usage_estimator.h"
using base::StringPiece;
@@ -32,6 +33,11 @@ void HpackWholeEntryBuffer::BufferStringsIfUnbuffered() {
value_.BufferStringIfUnbuffered();
}
+size_t HpackWholeEntryBuffer::EstimateMemoryUsage() const {
+ return base::trace_event::EstimateMemoryUsage(name_) +
+ base::trace_event::EstimateMemoryUsage(value_);
+}
+
void HpackWholeEntryBuffer::OnIndexedHeader(size_t index) {
DVLOG(2) << "HpackWholeEntryBuffer::OnIndexedHeader: index=" << index;
listener_->OnIndexedHeader(index);
« no previous file with comments | « net/http2/hpack/decoder/hpack_whole_entry_buffer.h ('k') | net/http2/hpack/decoder/http2_hpack_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698