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

Unified Diff: net/base/cookie_monster.h

Issue 2832061: Break out histogram counter variables as CookieMonster instance variables. (Closed)
Patch Set: Removed syntactic sugar and get() check. Created 10 years, 5 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 | « chrome/test/data/reliability/known_crashes.txt ('k') | net/base/cookie_monster.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cookie_monster.h
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h
index 4986cd4aecb653a459d555547e144d00c769ea59..96d98b3f879387e50f998eb4d1afa9b9eaa5b84e 100644
--- a/net/base/cookie_monster.h
+++ b/net/base/cookie_monster.h
@@ -72,6 +72,7 @@ class CookieMonster : public CookieStore {
last_access_threshold_milliseconds)),
delegate_(delegate),
last_statistic_record_time_(base::Time::Now()) {
+ InitializeHistograms();
SetDefaultCookieableSchemes();
}
#endif
@@ -287,6 +288,19 @@ class CookieMonster : public CookieStore {
// statistics if a sufficient time period has passed.
void RecordPeriodicStats(const base::Time& current_time);
+ // Histogram variables; see CookieMonster::InitializeHistograms() in
+ // cookie_monster.cc for details.
+ scoped_refptr<Histogram> histogram_expiration_duration_minutes_;
+ scoped_refptr<Histogram> histogram_between_access_interval_minutes_;
+ scoped_refptr<Histogram> histogram_evicted_last_access_minutes_;
+ scoped_refptr<Histogram> histogram_count_;
+ scoped_refptr<Histogram> histogram_number_duplicate_db_cookies_;
+ scoped_refptr<Histogram> histogram_cookie_deletion_cause_;
+
+ // Initialize the above variables; should only be called from
+ // the constructor.
+ void InitializeHistograms();
+
CookieMap cookies_;
// Indicates whether the cookie store has been initialized. This happens
« no previous file with comments | « chrome/test/data/reliability/known_crashes.txt ('k') | net/base/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698