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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/download/download_stats.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/download/download_stats.h" 5 #include "content/browser/download/download_stats.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 9
10 namespace download_stats { 10 namespace download_stats {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 received_kb, 54 received_kb,
55 1, 55 1,
56 kMaxKb, 56 kMaxKb,
57 kBuckets); 57 kBuckets);
58 if (!unknown_size) { 58 if (!unknown_size) {
59 UMA_HISTOGRAM_CUSTOM_COUNTS("Download.InterruptedTotalSizeK", 59 UMA_HISTOGRAM_CUSTOM_COUNTS("Download.InterruptedTotalSizeK",
60 total_kb, 60 total_kb,
61 1, 61 1,
62 kMaxKb, 62 kMaxKb,
63 kBuckets); 63 kBuckets);
64 if (delta_bytes >= 0) { 64 if (delta_bytes == 0) {
65 RecordDownloadCount(INTERRUPTED_AT_END_COUNT);
66 UMA_HISTOGRAM_CUSTOM_ENUMERATION(
67 "Download.InterruptedAtEndError",
68 -error,
69 base::CustomHistogram::ArrayToCustomRanges(
70 kAllNetErrorCodes, arraysize(kAllNetErrorCodes)));
71 } else if (delta_bytes > 0) {
65 UMA_HISTOGRAM_CUSTOM_COUNTS("Download.InterruptedOverrunBytes", 72 UMA_HISTOGRAM_CUSTOM_COUNTS("Download.InterruptedOverrunBytes",
66 delta_bytes, 73 delta_bytes,
67 1, 74 1,
68 kMaxKb, 75 kMaxKb,
69 kBuckets); 76 kBuckets);
70 } else { 77 } else {
71 UMA_HISTOGRAM_CUSTOM_COUNTS("Download.InterruptedUnderrunBytes", 78 UMA_HISTOGRAM_CUSTOM_COUNTS("Download.InterruptedUnderrunBytes",
72 -delta_bytes, 79 -delta_bytes,
73 1, 80 1,
74 kMaxKb, 81 kMaxKb,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 167 }
161 } 168 }
162 169
163 // Record the value. 170 // Record the value.
164 UMA_HISTOGRAM_ENUMERATION("Download.ContentType", 171 UMA_HISTOGRAM_ENUMERATION("Download.ContentType",
165 download_content, 172 download_content,
166 DOWNLOAD_CONTENT_MAX); 173 DOWNLOAD_CONTENT_MAX);
167 } 174 }
168 175
169 } // namespace download_stats 176 } // namespace download_stats
OLDNEW
« 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