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

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

Issue 7980018: Added UMA for downloads that are interrupted at the end. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
« no previous file with comments | « content/browser/download/download_stats.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_stats.cc
diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
index 90d943ab6f797d2ece720fc2116e4b38c23e738d..1abbc8c48fdd9ace389cf5524dd28889c9c45165 100644
--- a/content/browser/download/download_stats.cc
+++ b/content/browser/download/download_stats.cc
@@ -61,7 +61,14 @@ void RecordDownloadInterrupted(int error, int64 received, int64 total) {
1,
kMaxKb,
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",
delta_bytes,
1,
« no previous file with comments | « content/browser/download/download_stats.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698