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

Unified Diff: content/browser/download/download_stats.cc

Issue 8008021: Add new UMA stats to get a handle on Downloads UI Usage (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: comments Created 9 years, 3 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: content/browser/download/download_stats.cc
diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
index 1abbc8c48fdd9ace389cf5524dd28889c9c45165..77aa272d8115fb7f70b43486d9c1b3779deded9d 100644
--- a/content/browser/download/download_stats.cc
+++ b/content/browser/download/download_stats.cc
@@ -173,4 +173,50 @@ void RecordDownloadMimeType(const std::string& mime_type_string) {
DOWNLOAD_CONTENT_MAX);
}
+void RecordOpen(const base::Time& end, bool first) {
+ if (!end.is_null()) {
+ UMA_HISTOGRAM_LONG_TIMES("Download.OpenTime", (base::Time::Now() - end));
+ if (first) {
+ UMA_HISTOGRAM_LONG_TIMES("Download.FirstOpenTime",
+ (base::Time::Now() - end));
+ }
+ }
+}
+
+void RecordHistorySize(int size) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Download.HistorySize",
+ size,
+ 0/*min*/,
+ kint32max/*max*/,
+ (1 << 10)/*num_buckets*/);
+}
+
+void RecordHistorySize2(int size) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Download.HistorySize2",
+ size,
+ 0/*min*/,
+ kint32max/*max*/,
+ (1 << 10)/*num_buckets*/);
+}
+
+void RecordShelfSize(int size) {
+ UMA_HISTOGRAM_ENUMERATION("Download.ShelfSize",
+ size,
+ 128);
+}
+
+void RecordShelfPendingSize(int size) {
+ UMA_HISTOGRAM_ENUMERATION("Download.ShelfPendingSize",
+ size,
+ 128);
+}
+
+void RecordClearAllSize(int size) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Download.ClearAllSize",
+ size,
+ 0/*min*/,
+ kint32max/*max*/,
+ (1 << 10)/*num_buckets*/);
+}
+
} // namespace download_stats
« content/browser/download/download_manager.h ('K') | « content/browser/download/download_stats.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698