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

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

Issue 2769933003: Add more UMA to record whether parallel download is completed/interrupted/cancelled (Closed)
Patch Set: report interrupted UMA for all downloads 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.h
diff --git a/content/browser/download/download_stats.h b/content/browser/download/download_stats.h
index 0ecbf0cc6a6b2fef3e23d95198bcd6853842bd43..9de3d2b2a59262a8c98e1e57960ff0b193f9affb 100644
--- a/content/browser/download/download_stats.h
+++ b/content/browser/download/download_stats.h
@@ -91,12 +91,33 @@ enum DownloadCountTypes {
// candidates for partial resumption.
STRONG_VALIDATOR_AND_ACCEPTS_RANGES,
- // Count of downloads that uses parallel download requests.
+ // (Deprecated) Count of downloads that uses parallel download requests. Use
+ // PARALLEL_DOWNLOAD_START_COUNT instead.
USES_PARALLEL_REQUESTS,
DOWNLOAD_COUNT_TYPES_LAST_ENTRY
};
+// Enums for Download.ParallelDownloadCounts.
+enum ParallelDownloadCountTypes {
+ // Downloads that actually complete.
+ PARALLEL_DOWNLOAD_COMPLETED_COUNT,
+
+ // Downloads that are cancelled before completion (user action or error).
+ PARALLEL_DOWNLOAD_CANCELLED_COUNT,
+
+ // Downloads that are started.
+ PARALLEL_DOWNLOAD_START_COUNT,
+
+ // Downloads that were interrupted by the OS.
+ PARALLEL_DOWNLOAD_INTERRUPTED_COUNT,
+
+ // Counts interruptions that happened at the end of the download.
+ PARALLEL_DOWNLOAD_INTERRUPTED_AT_END_COUNT,
+
+ PARALLEL_DOWNLOAD_COUNT_TYPES_LAST_ENTRY
+};
+
enum DownloadSource {
// The download was initiated when the SavePackage system rejected
// a Save Page As ... by returning false from
@@ -149,7 +170,8 @@ void RecordDownloadCompleted(const base::TimeTicks& start,
// Record INTERRUPTED_COUNT, |reason|, |received| and |total| bytes.
void RecordDownloadInterrupted(DownloadInterruptReason reason,
int64_t received,
- int64_t total);
+ int64_t total,
+ bool uses_parallel_requests);
// Record that a download has been classified as malicious.
void RecordMaliciousDownloadClassified(DownloadDangerType danger_type);
@@ -205,6 +227,9 @@ void RecordFileBandwidth(size_t length,
base::TimeDelta disk_write_time,
base::TimeDelta elapsed_time);
+// Increment one of the count for parallel download.
+void RecordParallelDownloadCount(ParallelDownloadCountTypes type);
+
// Records the bandwidth for parallel download and estimates the saved time at
// the file end. Does not count in any hash computation or file open/close time.
void RecordParallelDownloadStats(

Powered by Google App Engine
This is Rietveld 408576698