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

Unified Diff: net/spdy/spdy_session.h

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_protocol.h ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.h
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 30150e2310cc3debca09b8c789dda2cc8cc9e668..00564823aa117f8b8cbf97912381b9fa9da4e54d 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;
@@ -242,6 +245,7 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
PushedStreamInfo(SpdyStreamId stream_id, base::TimeTicks creation_time)
: stream_id(stream_id), creation_time(creation_time) {}
~PushedStreamInfo() {}
+ size_t EstimateMemoryUsage() const { return 0; }
SpdyStreamId stream_id;
base::TimeTicks creation_time;
@@ -271,6 +275,8 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
SpdyStreamId stream_id,
const base::TimeTicks& creation_time);
+ size_t EstimateMemoryUsage() const;
+
private:
SpdySession* spdy_session_;
@@ -565,8 +571,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;
« no previous file with comments | « net/spdy/spdy_protocol.h ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698