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

Unified Diff: net/spdy/spdy_framer.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_buffer_producer.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer.h
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index 9bbfd2cf3f470cca4a8901ac5363bd3b11481c44..59f35f13d674295f5993bf94b03f1164d4e50466 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;
« no previous file with comments | « net/spdy/spdy_buffer_producer.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698