Chromium Code Reviews| 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, |
|
David Trainor- moved to gerrit
2017/03/23 21:43:07
DOWNLOAD_COUNT_UNUSED_18?
qinmin
2017/03/23 21:52:47
i am wondering whether i can remove this, this is
|
| DOWNLOAD_COUNT_TYPES_LAST_ENTRY |
| }; |
| +// Enums for Download.ParallelDownloadCounts. |
| +enum ParallelDownloadCountTypes { |
| + // Downloads that actually complete. |
| + PARALLEL_DOWNLOAD_COMPLETED_COUNT, |
|
David Trainor- moved to gerrit
2017/03/23 21:43:07
How many of these will double count with the non-p
qinmin
2017/03/23 21:52:47
Not sure exact percentage, but we should expect si
|
| + |
| + // 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( |