OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 void RecordFileThreadReceiveBuffers(size_t num_buffers); | 121 void RecordFileThreadReceiveBuffers(size_t num_buffers); |
122 | 122 |
123 // Record the bandwidth seen in DownloadResourceHandler | 123 // Record the bandwidth seen in DownloadResourceHandler |
124 // |actual_bandwidth| and |potential_bandwidth| are in bytes/second. | 124 // |actual_bandwidth| and |potential_bandwidth| are in bytes/second. |
125 void RecordBandwidth(double actual_bandwidth, double potential_bandwidth); | 125 void RecordBandwidth(double actual_bandwidth, double potential_bandwidth); |
126 | 126 |
127 // Record the time of both the first open and all subsequent opens since the | 127 // Record the time of both the first open and all subsequent opens since the |
128 // download completed. | 128 // download completed. |
129 void RecordOpen(const base::Time& end, bool first); | 129 void RecordOpen(const base::Time& end, bool first); |
130 | 130 |
131 // Record the number of items that are in the history at the time that a | |
132 // new download is added to the history. | |
133 void RecordHistorySize(int size); | |
134 | |
135 // Record whether or not the server accepts ranges, and the download size. | 131 // Record whether or not the server accepts ranges, and the download size. |
136 void RecordAcceptsRanges(const std::string& accepts_ranges, int64 download_len); | 132 void RecordAcceptsRanges(const std::string& accepts_ranges, int64 download_len); |
137 | 133 |
138 // Record the number of downloads removed by ClearAll. | 134 // Record the number of downloads removed by ClearAll. |
139 void RecordClearAllSize(int size); | 135 void RecordClearAllSize(int size); |
140 | 136 |
141 // Record the number of completed unopened downloads when a download is opened. | 137 // Record the number of completed unopened downloads when a download is opened. |
142 void RecordOpensOutstanding(int size); | 138 void RecordOpensOutstanding(int size); |
143 | 139 |
144 // Record how long we block the file thread at a time. | 140 // Record how long we block the file thread at a time. |
(...skipping 27 matching lines...) Expand all Loading... |
172 SAVE_PACKAGE_WRITE_TO_FAILED, | 168 SAVE_PACKAGE_WRITE_TO_FAILED, |
173 | 169 |
174 SAVE_PACKAGE_LAST_ENTRY | 170 SAVE_PACKAGE_LAST_ENTRY |
175 }; | 171 }; |
176 | 172 |
177 void RecordSavePackageEvent(SavePackageEvent event); | 173 void RecordSavePackageEvent(SavePackageEvent event); |
178 | 174 |
179 } // namespace content | 175 } // namespace content |
180 | 176 |
181 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 177 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
OLD | NEW |