| Index: content/browser/download/download_stats.cc
|
| diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
|
| index 87fbe199defcee2e36592a7e527d14245328ec72..b28fffc85112079d04c6165daf5ef7f47b9e5a55 100644
|
| --- a/content/browser/download/download_stats.cc
|
| +++ b/content/browser/download/download_stats.cc
|
| @@ -583,9 +583,8 @@ void RecordDownloadImageType(const std::string& mime_type_string) {
|
| DOWNLOAD_IMAGE_MAX);
|
| }
|
|
|
| -} // namespace
|
| -
|
| -void RecordDownloadMimeType(const std::string& mime_type_string) {
|
| +DownloadContent DownloadContentTypeFromMimeType(
|
| + const std::string& mime_type_string) {
|
| DownloadContent download_content = DOWNLOAD_CONTENT_UNRECOGNIZED;
|
|
|
| // Look up exact matches.
|
| @@ -615,12 +614,30 @@ void RecordDownloadMimeType(const std::string& mime_type_string) {
|
| }
|
| }
|
|
|
| + return download_content;
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| +void RecordDownloadMimeType(const std::string& mime_type_string) {
|
| + DownloadContent download_content =
|
| + DownloadContentTypeFromMimeType(mime_type_string);
|
| +
|
| // Record the value.
|
| - UMA_HISTOGRAM_ENUMERATION("Download.ContentType",
|
| - download_content,
|
| + UMA_HISTOGRAM_ENUMERATION("Download.ContentType", download_content,
|
| DOWNLOAD_CONTENT_MAX);
|
| }
|
|
|
| +void RecordDownloadMimeTypeForNormalProfile(
|
| + const std::string& mime_type_string) {
|
| + DownloadContent download_content =
|
| + DownloadContentTypeFromMimeType(mime_type_string);
|
| +
|
| + // Record the value.
|
| + UMA_HISTOGRAM_ENUMERATION("Download.ContentType.NonOffTheRecord",
|
| + download_content, DOWNLOAD_CONTENT_MAX);
|
| +}
|
| +
|
| void RecordDownloadContentDisposition(
|
| const std::string& content_disposition_string) {
|
| if (content_disposition_string.empty())
|
|
|