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

Unified Diff: net/spdy/spdy_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/spdy/spdy_buffer.h ('k') | net/spdy/spdy_buffer_producer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_buffer.cc
diff --git a/net/spdy/spdy_buffer.cc b/net/spdy/spdy_buffer.cc
index 28e807def4dd1f389a495e6e3edff171d104579d..1c2d6ede6b022681b7a2236849bd950cd0713c2b 100644
--- a/net/spdy/spdy_buffer.cc
+++ b/net/spdy/spdy_buffer.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "net/base/io_buffer.h"
+#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
#include "net/spdy/spdy_protocol.h"
namespace net {
@@ -97,6 +98,11 @@ IOBuffer* SpdyBuffer::GetIOBufferForRemainingData() {
return new SharedFrameIOBuffer(shared_frame_, offset_);
}
+size_t SpdyBuffer::EstimateMemoryUsage() const {
+ // TODO(xunjieli): Estimate |consume_callbacks_|. https://crbug.com/669108.
+ return SpdyEstimateMemoryUsage(shared_frame_->data);
+}
+
void SpdyBuffer::ConsumeHelper(size_t consume_size,
ConsumeSource consume_source) {
DCHECK_GE(consume_size, 1u);
« no previous file with comments | « net/spdy/spdy_buffer.h ('k') | net/spdy/spdy_buffer_producer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698