OLD | NEW |
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void RecordBandwidth(double actual_bandwidth, double potential_bandwidth); | 101 void RecordBandwidth(double actual_bandwidth, double potential_bandwidth); |
102 | 102 |
103 // Record the time of both the first open and all subsequent opens since the | 103 // Record the time of both the first open and all subsequent opens since the |
104 // download completed. | 104 // download completed. |
105 void RecordOpen(const base::Time& end, bool first); | 105 void RecordOpen(const base::Time& end, bool first); |
106 | 106 |
107 // Record the number of items that are in the history at the time that a | 107 // Record the number of items that are in the history at the time that a |
108 // new download is added to the history. | 108 // new download is added to the history. |
109 void RecordHistorySize(int size); | 109 void RecordHistorySize(int size); |
110 | 110 |
111 // Record whether or not the server accepts ranges, and the download size . | 111 // Record whether or not the server accepts ranges, and the download size. |
112 void RecordAcceptsRanges(const std::string& accepts_ranges, int64 download_len); | 112 void RecordAcceptsRanges(const std::string& accepts_ranges, int64 download_len); |
113 | 113 |
114 // Record the total number of items and the number of in-progress items showing | 114 // Record the total number of items and the number of in-progress items showing |
115 // in the shelf when it closes. Set |autoclose| to true when the shelf is | 115 // in the shelf when it closes. Set |autoclose| to true when the shelf is |
116 // closing itself, false when the user explicitly closed it. | 116 // closing itself, false when the user explicitly closed it. |
117 CONTENT_EXPORT void RecordShelfClose(int size, int in_progress, bool autoclose); | 117 CONTENT_EXPORT void RecordShelfClose(int size, int in_progress, bool autoclose); |
118 | 118 |
119 // Record the number of downloads removed by ClearAll. | 119 // Record the number of downloads removed by ClearAll. |
120 void RecordClearAllSize(int size); | 120 void RecordClearAllSize(int size); |
121 | 121 |
122 // Record the number of completed unopened downloads when a download is opened. | 122 // Record the number of completed unopened downloads when a download is opened. |
123 void RecordOpensOutstanding(int size); | 123 void RecordOpensOutstanding(int size); |
124 | 124 |
125 } // namespace download_stats | 125 } // namespace download_stats |
126 | 126 |
127 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 127 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
OLD | NEW |