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

Side by Side Diff: content/browser/download/download_stats.h

Issue 7796014: Make cancel remove cancelled download from active queues at time of cancel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final Cancel arg fix. 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
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 // Holds helpers for gathering UMA stats about downloads. 5 // Holds helpers for gathering UMA stats about downloads.
6 6
7 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ 7 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_
8 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ 8 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Downloads that were interrupted by the OS. 57 // Downloads that were interrupted by the OS.
58 INTERRUPTED_COUNT, 58 INTERRUPTED_COUNT,
59 59
60 // Write sizes for downloads. 60 // Write sizes for downloads.
61 WRITE_SIZE_COUNT, 61 WRITE_SIZE_COUNT,
62 62
63 // Counts iterations of the BaseFile::AppendDataToFile() loop. 63 // Counts iterations of the BaseFile::AppendDataToFile() loop.
64 WRITE_LOOP_COUNT, 64 WRITE_LOOP_COUNT,
65 65
66 // Downloads that were removed by the user.
67 REMOVED_COUNT,
68
66 DOWNLOAD_COUNT_TYPES_LAST_ENTRY 69 DOWNLOAD_COUNT_TYPES_LAST_ENTRY
67 }; 70 };
68 71
69 // Increment one of the above counts. 72 // Increment one of the above counts.
70 void RecordDownloadCount(DownloadCountTypes type); 73 void RecordDownloadCount(DownloadCountTypes type);
71 74
72 // Record COMPLETED_COUNT and how long the download took. 75 // Record COMPLETED_COUNT and how long the download took.
73 void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len); 76 void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len);
74 77
75 // Record INTERRUPTED_COUNT, |error|, |received| and |total| bytes. 78 // Record INTERRUPTED_COUNT, |error|, |received| and |total| bytes.
76 void RecordDownloadInterrupted(int error, int64 received, int64 total); 79 void RecordDownloadInterrupted(int error, int64 received, int64 total);
77 80
78 // Records the mime type of the download. 81 // Records the mime type of the download.
79 void RecordDownloadMimeType(const std::string& mime_type); 82 void RecordDownloadMimeType(const std::string& mime_type);
80 83
81 // Record WRITE_SIZE_COUNT and data_len. 84 // Record WRITE_SIZE_COUNT and data_len.
82 void RecordDownloadWriteSize(size_t data_len); 85 void RecordDownloadWriteSize(size_t data_len);
83 86
84 // Record WRITE_LOOP_COUNT and number of loops. 87 // Record WRITE_LOOP_COUNT and number of loops.
85 void RecordDownloadWriteLoopCount(int count); 88 void RecordDownloadWriteLoopCount(int count);
86 89
87 } // namespace download_stats 90 } // namespace download_stats
88 91
89 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ 92 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698