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

Unified Diff: net/sdch/sdch_owner.h

Issue 1051353003: SDCH: add TimeWeightedMemoryUse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | net/sdch/sdch_owner.cc » ('j') | net/sdch/sdch_owner.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/sdch/sdch_owner.h
diff --git a/net/sdch/sdch_owner.h b/net/sdch/sdch_owner.h
index 1655275d67a3e8365dc61cf8b01268a5e2884906..bd5b6aa965cafaccf6e8dc1658f76ca36a152e8c 100644
--- a/net/sdch/sdch_owner.h
+++ b/net/sdch/sdch_owner.h
@@ -116,6 +116,10 @@ class NET_EXPORT SdchOwner : public net::SdchObserver,
bool IsPersistingDictionaries() const;
+ // Record the lifetime memory use of a specified dictionary, identified by
+ // server hash.
+ void RecordDictionaryLifetime(const std::string& server_hash, size_t size);
+
// For investigation of http://crbug.com/454198; remove when resolved.
base::WeakPtr<net::SdchManager> manager_;
scoped_ptr<net::SdchDictionaryFetcher> fetcher_;
@@ -158,6 +162,10 @@ class NET_EXPORT SdchOwner : public net::SdchObserver,
// load.
std::map<std::string, int> use_counts_at_load_;
+ // Load times for loaded dictionaries, keyed by server hash. These are used to
+ // track the durations that dictionaries are in memory.
+ std::map<std::string, base::Time> load_times_;
+
DISALLOW_COPY_AND_ASSIGN(SdchOwner);
};
« no previous file with comments | « no previous file | net/sdch/sdch_owner.cc » ('j') | net/sdch/sdch_owner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698