| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // how often, for each download, something other than the network | 193 // how often, for each download, something other than the network |
| 194 // was the bottleneck). | 194 // was the bottleneck). |
| 195 void RecordNetworkBlockage(base::TimeDelta resource_handler_lifetime, | 195 void RecordNetworkBlockage(base::TimeDelta resource_handler_lifetime, |
| 196 base::TimeDelta resource_handler_blocked_time); | 196 base::TimeDelta resource_handler_blocked_time); |
| 197 | 197 |
| 198 // Record overall bandwidth stats at the file end. | 198 // Record overall bandwidth stats at the file end. |
| 199 void RecordFileBandwidth(size_t length, | 199 void RecordFileBandwidth(size_t length, |
| 200 base::TimeDelta disk_write_time, | 200 base::TimeDelta disk_write_time, |
| 201 base::TimeDelta elapsed_time); | 201 base::TimeDelta elapsed_time); |
| 202 | 202 |
| 203 // Record the result of a download file rename. |
| 204 void RecordDownloadFileRenameResultAfterRetry( |
| 205 base::TimeDelta time_since_first_failure, |
| 206 DownloadInterruptReason interrupt_reason); |
| 207 |
| 203 enum SavePackageEvent { | 208 enum SavePackageEvent { |
| 204 // The user has started to save a page as a package. | 209 // The user has started to save a page as a package. |
| 205 SAVE_PACKAGE_STARTED, | 210 SAVE_PACKAGE_STARTED, |
| 206 | 211 |
| 207 // The save package operation was cancelled. | 212 // The save package operation was cancelled. |
| 208 SAVE_PACKAGE_CANCELLED, | 213 SAVE_PACKAGE_CANCELLED, |
| 209 | 214 |
| 210 // The save package operation finished without being cancelled. | 215 // The save package operation finished without being cancelled. |
| 211 SAVE_PACKAGE_FINISHED, | 216 SAVE_PACKAGE_FINISHED, |
| 212 | 217 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 230 | 235 |
| 231 // Record the state of the origin information across a download resumption | 236 // Record the state of the origin information across a download resumption |
| 232 // request. |state| is a combination of values from OriginStateOnResumption | 237 // request. |state| is a combination of values from OriginStateOnResumption |
| 233 // enum. | 238 // enum. |
| 234 void RecordOriginStateOnResumption(bool is_partial, | 239 void RecordOriginStateOnResumption(bool is_partial, |
| 235 int state); | 240 int state); |
| 236 | 241 |
| 237 } // namespace content | 242 } // namespace content |
| 238 | 243 |
| 239 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 244 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |