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

Unified Diff: net/spdy/spdy_write_queue.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/spdy_write_queue.h ('k') | net/spdy/spdy_write_queue_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_write_queue.cc
diff --git a/net/spdy/spdy_write_queue.cc b/net/spdy/spdy_write_queue.cc
index 50df9440a777541ffcf4cbc66c45eb4f08243a02..db498f3af9c96f41e4ed127dedf45ce68a060004 100644
--- a/net/spdy/spdy_write_queue.cc
+++ b/net/spdy/spdy_write_queue.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "base/logging.h"
+#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
#include "net/spdy/spdy_buffer.h"
#include "net/spdy/spdy_buffer_producer.h"
#include "net/spdy/spdy_stream.h"
@@ -32,6 +33,10 @@ SpdyWriteQueue::PendingWrite::PendingWrite(PendingWrite&& other) = default;
SpdyWriteQueue::PendingWrite& SpdyWriteQueue::PendingWrite::operator=(
PendingWrite&& other) = default;
+size_t SpdyWriteQueue::PendingWrite::EstimateMemoryUsage() const {
+ return SpdyEstimateMemoryUsage(frame_producer);
+}
+
SpdyWriteQueue::SpdyWriteQueue() : removing_writes_(false) {}
SpdyWriteQueue::~SpdyWriteQueue() {
@@ -155,4 +160,8 @@ void SpdyWriteQueue::Clear() {
removing_writes_ = false;
}
+size_t SpdyWriteQueue::EstimateMemoryUsage() const {
+ return SpdyEstimateMemoryUsage(queue_);
+}
+
} // namespace net
« no previous file with comments | « net/spdy/spdy_write_queue.h ('k') | net/spdy/spdy_write_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698