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

Unified Diff: net/spdy/http2_priority_dependencies.cc

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: Address Bence comments 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/http2_priority_dependencies.cc
diff --git a/net/spdy/http2_priority_dependencies.cc b/net/spdy/http2_priority_dependencies.cc
index 9cbfba07c1540cf4a42c39e8575c864e01d17a84..90ec8562cccaa54f6755656914660a962aa288d0 100644
--- a/net/spdy/http2_priority_dependencies.cc
+++ b/net/spdy/http2_priority_dependencies.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "net/spdy/http2_priority_dependencies.h"
+#include "base/trace_event/memory_usage_estimator.h"
namespace net {
@@ -157,4 +158,10 @@ void Http2PriorityDependencies::OnStreamDestruction(SpdyStreamId id) {
entry_by_stream_id_.erase(emit);
}
+size_t Http2PriorityDependencies::EstimateMemoryUsage() const {
+ return base::trace_event::EstimateMemoryUsage(id_priority_lists_);
+ // TODO(xunjieli): https://crbug.com/669108. Include |entry_by_stream_id_|
+ // when memory_usage_estimator.h supports std::list::iterator.
DmitrySkiba 2017/02/06 18:02:34 Nice catch! I'll implement EMUs for iterators (I w
xunjieli 2017/02/08 15:42:50 Acknowledged. Thanks! I will file 690015 to keep t
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698