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

Unified Diff: net/spdy/spdy_buffer.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_buffer.cc
diff --git a/net/spdy/spdy_buffer.cc b/net/spdy/spdy_buffer.cc
index 28e807def4dd1f389a495e6e3edff171d104579d..b111303f893dd39071d3f65953465804dbdde9ec 100644
--- a/net/spdy/spdy_buffer.cc
+++ b/net/spdy/spdy_buffer.cc
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/trace_event/memory_usage_estimator.h"
#include "net/base/io_buffer.h"
#include "net/spdy/spdy_protocol.h"
@@ -97,6 +98,10 @@ IOBuffer* SpdyBuffer::GetIOBufferForRemainingData() {
return new SharedFrameIOBuffer(shared_frame_, offset_);
}
+size_t SpdyBuffer::EstimateMemoryUsage() const {
+ return shared_frame_->data->size();
DmitrySkiba 2017/02/02 18:16:27 I think that SpdySerializedFrame should implement
xunjieli 2017/02/03 22:25:09 Done.
+}
+
void SpdyBuffer::ConsumeHelper(size_t consume_size,
ConsumeSource consume_source) {
DCHECK_GE(consume_size, 1u);

Powered by Google App Engine
This is Rietveld 408576698