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

Unified Diff: net/spdy/spdy_session.h

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: 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_session.h
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index fb61ec755e4f7de79b76ae226a1430ae989b6127..a78ad9210daae7813f3d3c50d80cb986ebc2b59e 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -191,6 +191,9 @@ class NET_EXPORT_PRIVATE SpdyStreamRequest {
// set a delegate for the returned stream (except for test code).
base::WeakPtr<SpdyStream> ReleaseStream();
+ // Returns the estimate of dynamically allocated memory in bytes.
+ size_t EstimateMemoryUsage() const;
+
private:
friend class SpdySession;
@@ -565,8 +568,10 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
// indicate whether session is active.
// |stats| can be assumed as being default initialized upon entry.
// Implementation overrides fields in |stats|.
- void DumpMemoryStats(StreamSocket::SocketMemoryStats* stats,
- bool* is_session_active) const;
+ // Returns the estimate of dynamically allocated memory in bytes, which
+ // includes the size attributed to the underlying socket.
+ size_t DumpMemoryStats(StreamSocket::SocketMemoryStats* stats,
+ bool* is_session_active) const;
private:
friend class test::SpdyStreamTest;

Powered by Google App Engine
This is Rietveld 408576698