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

Unified Diff: net/spdy/spdy_protocol.h

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/spdy_protocol.h
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h
index 9d4ec44fc52c97015417132af5cf820bafc380be..f395a75d96dade970b3a5db3d5682b76486028f1 100644
--- a/net/spdy/spdy_protocol.h
+++ b/net/spdy/spdy_protocol.h
@@ -858,6 +858,13 @@ class SpdySerializedFrame {
return buffer;
}
+ // Returns the estimate of dynamically allocated memory in bytes.
+ size_t EstimateMemoryUsage() const {
+ if (owns_buffer_)
Bence 2017/02/08 14:46:45 Optional: if you think it is easier to read, maybe
xunjieli 2017/02/08 15:42:50 Done.
+ return size_;
+ return 0;
+ }
+
protected:
char* frame_;

Powered by Google App Engine
This is Rietveld 408576698