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

Unified Diff: content/browser/net/sqlite_persistent_cookie_store.cc

Issue 1131413004: Add histograms for deletion of session cookies on startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from erikwright. Created 5 years, 7 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/net/sqlite_persistent_cookie_store.cc
diff --git a/content/browser/net/sqlite_persistent_cookie_store.cc b/content/browser/net/sqlite_persistent_cookie_store.cc
index 6b2ff26ec3703f05d83b3d892ac16b6468a35700..86268cb9be7a426c88ddc6635eaf296e69b196ad 100644
--- a/content/browser/net/sqlite_persistent_cookie_store.cc
+++ b/content/browser/net/sqlite_persistent_cookie_store.cc
@@ -701,8 +701,16 @@ bool SQLitePersistentCookieStore::Backend::InitializeDatabase() {
initialized_ = true;
- if (!restore_old_session_cookies_)
+ if (!restore_old_session_cookies_) {
+ base::Time start_time = base::Time::Now();
DeleteSessionCookiesOnStartup();
+
+ UMA_HISTOGRAM_TIMES("Cookie.Startup.TimeSpentDeletingCookies",
+ base::Time::Now() - start_time);
+ UMA_HISTOGRAM_COUNTS("Cookie.Startup.NumberOfCookiesDeleted",
+ db_->GetLastChangeCount());
erikwright (departed) 2015/05/12 19:39:50 Either: (1) Have DeleteSessionCookiesOnStartup re
erikchen 2015/05/12 20:33:49 Oh yes, good point. This logic originally started
+ }
+
return true;
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698