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

Unified Diff: net/spdy/spdy_framer.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_framer.h
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index 3a8dafe458a7f9aebc765588f57e7aecc65eecbc..350ec545047e028f9e64244ea4d304f4ccc9ccb4 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -528,6 +528,9 @@ class NET_EXPORT_PRIVATE SpdyFramer {
return GetHpackDecoder();
}
+ // Returns the estimate of dynamically allocated memory in bytes.
+ size_t EstimateMemoryUsage() const;
+
protected:
friend class BufferedSpdyFramer;
friend class HttpNetworkLayer; // This is temporary for the server.
@@ -553,6 +556,8 @@ class NET_EXPORT_PRIVATE SpdyFramer {
const char* data() const { return buffer_.get(); }
size_t len() const { return len_; }
+ size_t EstimateMemoryUsage() const;
+
private:
std::unique_ptr<char[]> buffer_;
size_t capacity_;
@@ -563,6 +568,7 @@ class NET_EXPORT_PRIVATE SpdyFramer {
struct SpdySettingsScratch {
SpdySettingsScratch();
void Reset();
+ size_t EstimateMemoryUsage() const;
// Buffer contains up to one complete key/value pair.
CharBuffer buffer;

Powered by Google App Engine
This is Rietveld 408576698