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

Unified Diff: net/spdy/hpack/hpack_entry.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
Index: net/spdy/hpack/hpack_entry.cc
diff --git a/net/spdy/hpack/hpack_entry.cc b/net/spdy/hpack/hpack_entry.cc
index 9a4707915e128c92804e326fea201e08f84e54f7..c6c60f73145268a2f27b3d06f4f40a68de6a77c9 100644
--- a/net/spdy/hpack/hpack_entry.cc
+++ b/net/spdy/hpack/hpack_entry.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
+#include "base/trace_event/memory_usage_estimator.h"
namespace net {
@@ -76,4 +77,9 @@ std::string HpackEntry::GetDebugString() const {
" }";
}
+size_t HpackEntry::EstimateMemoryUsage() const {
+ return base::trace_event::EstimateMemoryUsage(name_) +
+ base::trace_event::EstimateMemoryUsage(value_);
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698