Added UMA for downloads that are interrupted at the end.


BUG=None
TEST=None


Review URL: http://codereview.chromium.org/7980018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102189 0039d316-1c4b-4281-b951-d872f2087c98
parent c44a7549
...@@ -61,7 +61,14 @@ void RecordDownloadInterrupted(int error, int64 received, int64 total) { ...@@ -61,7 +61,14 @@ void RecordDownloadInterrupted(int error, int64 received, int64 total) {
1, 1,
kMaxKb, kMaxKb,
kBuckets); kBuckets);
if (delta_bytes >= 0) { if (delta_bytes == 0) {
RecordDownloadCount(INTERRUPTED_AT_END_COUNT);
UMA_HISTOGRAM_CUSTOM_ENUMERATION(
"Download.InterruptedAtEndError",
-error,
base::CustomHistogram::ArrayToCustomRanges(
kAllNetErrorCodes, arraysize(kAllNetErrorCodes)));
} else if (delta_bytes > 0) {
UMA_HISTOGRAM_CUSTOM_COUNTS("Download.InterruptedOverrunBytes", UMA_HISTOGRAM_CUSTOM_COUNTS("Download.InterruptedOverrunBytes",
delta_bytes, delta_bytes,
1, 1,
......
...@@ -64,6 +64,9 @@ enum DownloadCountTypes { ...@@ -64,6 +64,9 @@ enum DownloadCountTypes {
// Counts iterations of the BaseFile::AppendDataToFile() loop. // Counts iterations of the BaseFile::AppendDataToFile() loop.
WRITE_LOOP_COUNT, WRITE_LOOP_COUNT,
// Counts interruptions that happened at the end of the download.
INTERRUPTED_AT_END_COUNT,
DOWNLOAD_COUNT_TYPES_LAST_ENTRY DOWNLOAD_COUNT_TYPES_LAST_ENTRY
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment