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

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: Fix to try to get past main waterfall failure. 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 // Downloads that were interrupted by the OS. 58 // Downloads that were interrupted by the OS.
59 INTERRUPTED_COUNT, 59 INTERRUPTED_COUNT,
60 60
61 // Write sizes for downloads. 61 // Write sizes for downloads.
62 WRITE_SIZE_COUNT, 62 WRITE_SIZE_COUNT,
63 63
64 // Counts iterations of the BaseFile::AppendDataToFile() loop. 64 // Counts iterations of the BaseFile::AppendDataToFile() loop.
65 WRITE_LOOP_COUNT, 65 WRITE_LOOP_COUNT,
66 66
67 // Downloads that were removed by the user.
68 REMOVED_COUNT,
69
67 DOWNLOAD_COUNT_TYPES_LAST_ENTRY 70 DOWNLOAD_COUNT_TYPES_LAST_ENTRY
68 }; 71 };
69 72
70 // Increment one of the above counts. 73 // Increment one of the above counts.
71 CONTENT_EXPORT void RecordDownloadCount(DownloadCountTypes type); 74 CONTENT_EXPORT void RecordDownloadCount(DownloadCountTypes type);
72 75
73 // Record COMPLETED_COUNT and how long the download took. 76 // Record COMPLETED_COUNT and how long the download took.
74 void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len); 77 void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len);
75 78
76 // Record INTERRUPTED_COUNT, |error|, |received| and |total| bytes. 79 // Record INTERRUPTED_COUNT, |error|, |received| and |total| bytes.
77 void RecordDownloadInterrupted(int error, int64 received, int64 total); 80 void RecordDownloadInterrupted(int error, int64 received, int64 total);
78 81
79 // Records the mime type of the download. 82 // Records the mime type of the download.
80 void RecordDownloadMimeType(const std::string& mime_type); 83 void RecordDownloadMimeType(const std::string& mime_type);
81 84
82 // Record WRITE_SIZE_COUNT and data_len. 85 // Record WRITE_SIZE_COUNT and data_len.
83 void RecordDownloadWriteSize(size_t data_len); 86 void RecordDownloadWriteSize(size_t data_len);
84 87
85 // Record WRITE_LOOP_COUNT and number of loops. 88 // Record WRITE_LOOP_COUNT and number of loops.
86 void RecordDownloadWriteLoopCount(int count); 89 void RecordDownloadWriteLoopCount(int count);
87 90
88 } // namespace download_stats 91 } // namespace download_stats
89 92
90 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ 93 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_request_handle.h ('k') | content/browser/download/mock_download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698