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

Unified Diff: net/http/http_cache.h

Issue 2661333002: Track SimpleCache memory usage in net/ MemoryDumpProvider (Closed)
Patch Set: address 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/http/http_cache.h
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 60bab05ab2b680ffb54877f46441e08b70580838..4835e88b9c8bbb3a570cfd4bb2fd0a092040763d 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -38,6 +38,9 @@ class GURL;
namespace base {
class SingleThreadTaskRunner;
+namespace trace_event {
+class ProcessMemoryDump;
+}
} // namespace base
namespace disk_cache {
@@ -215,6 +218,11 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
SetHttpNetworkTransactionFactoryForTesting(
std::unique_ptr<HttpTransactionFactory> new_network_layer);
+ // Dumps memory allocation stats. |parent_dump_absolute_name| is the name
+ // used by the parent MemoryAllocatorDump in the memory dump hierarchy.
+ void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd,
+ const std::string& parent_absolute_name) const;
+
private:
// Types --------------------------------------------------------------------
@@ -242,6 +250,7 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
struct ActiveEntry {
explicit ActiveEntry(disk_cache::Entry* entry);
~ActiveEntry();
+ size_t EstimateMemoryUsage() const;
disk_cache::Entry* disk_entry;
Transaction* writer;

Powered by Google App Engine
This is Rietveld 408576698