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

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

Issue 2758453003: Recording download mime types for normal profile (Closed)
Patch Set: Renamed histogam and added new metrics for new download Created 3 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
Index: content/browser/download/download_stats.cc
diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
index 0bfb00271b99a6cbb6acbab0414b2799a665f378..c4e4f046b6a98d96f9562151ee2f4ef82854a27e 100644
--- a/content/browser/download/download_stats.cc
+++ b/content/browser/download/download_stats.cc
@@ -594,14 +594,12 @@ void RecordDownloadImageType(const std::string& mime_type_string) {
}
}
- UMA_HISTOGRAM_ENUMERATION("Download.ContentImageType",
- download_image,
+ UMA_HISTOGRAM_ENUMERATION("Download.ContentImageType", download_image,
DOWNLOAD_IMAGE_MAX);
}
-} // namespace
-
-void RecordDownloadMimeType(const std::string& mime_type_string) {
+DownloadContent DownloadContentFromMimeType(
+ const std::string& mime_type_string) {
DownloadContent download_content = DOWNLOAD_CONTENT_UNRECOGNIZED;
// Look up exact matches.
@@ -631,9 +629,21 @@ void RecordDownloadMimeType(const std::string& mime_type_string) {
}
}
- // Record the value.
- UMA_HISTOGRAM_ENUMERATION("Download.ContentType",
- download_content,
+ return download_content;
+}
+
+} // namespace
+
+void RecordDownloadMimeType(const std::string& mime_type_string) {
+ UMA_HISTOGRAM_ENUMERATION("Download.Start.ContentType",
+ DownloadContentFromMimeType(mime_type_string),
+ DOWNLOAD_CONTENT_MAX);
+}
+
+void RecordDownloadMimeTypeForNormalProfile(
+ const std::string& mime_type_string) {
+ UMA_HISTOGRAM_ENUMERATION("Download.Start.ContentType.NormalProfile",
+ DownloadContentFromMimeType(mime_type_string),
DOWNLOAD_CONTENT_MAX);
}

Powered by Google App Engine
This is Rietveld 408576698