| 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 <stddef.h> | 10 #include <stddef.h> |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // was the bottleneck). | 195 // was the bottleneck). |
| 196 void RecordNetworkBlockage(base::TimeDelta resource_handler_lifetime, | 196 void RecordNetworkBlockage(base::TimeDelta resource_handler_lifetime, |
| 197 base::TimeDelta resource_handler_blocked_time); | 197 base::TimeDelta resource_handler_blocked_time); |
| 198 | 198 |
| 199 // Record overall bandwidth stats at the file end. | 199 // Record overall bandwidth stats at the file end. |
| 200 // Does not count in any hash computation or file open/close time. | 200 // Does not count in any hash computation or file open/close time. |
| 201 void RecordFileBandwidth(size_t length, | 201 void RecordFileBandwidth(size_t length, |
| 202 base::TimeDelta disk_write_time, | 202 base::TimeDelta disk_write_time, |
| 203 base::TimeDelta elapsed_time); | 203 base::TimeDelta elapsed_time); |
| 204 | 204 |
| 205 // Records the bandwidth for parallel download and estimates the saved time at |
| 206 // the file end. Does not count in any hash computation or file open/close time. |
| 207 void RecordParallelDownloadStats( |
| 208 size_t bytes_downloaded_with_parallel_streams, |
| 209 base::TimeDelta time_with_parallel_streams, |
| 210 size_t bytes_downloaded_without_parallel_streams, |
| 211 base::TimeDelta time_without_parallel_streams); |
| 212 |
| 205 // Record the result of a download file rename. | 213 // Record the result of a download file rename. |
| 206 void RecordDownloadFileRenameResultAfterRetry( | 214 void RecordDownloadFileRenameResultAfterRetry( |
| 207 base::TimeDelta time_since_first_failure, | 215 base::TimeDelta time_since_first_failure, |
| 208 DownloadInterruptReason interrupt_reason); | 216 DownloadInterruptReason interrupt_reason); |
| 209 | 217 |
| 210 enum SavePackageEvent { | 218 enum SavePackageEvent { |
| 211 // The user has started to save a page as a package. | 219 // The user has started to save a page as a package. |
| 212 SAVE_PACKAGE_STARTED, | 220 SAVE_PACKAGE_STARTED, |
| 213 | 221 |
| 214 // The save package operation was cancelled. | 222 // The save package operation was cancelled. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 243 | 251 |
| 244 void RecordDownloadConnectionSecurity(const GURL& download_url, | 252 void RecordDownloadConnectionSecurity(const GURL& download_url, |
| 245 const std::vector<GURL>& url_chain); | 253 const std::vector<GURL>& url_chain); |
| 246 | 254 |
| 247 void RecordDownloadSourcePageTransitionType( | 255 void RecordDownloadSourcePageTransitionType( |
| 248 const base::Optional<ui::PageTransition>& transition); | 256 const base::Optional<ui::PageTransition>& transition); |
| 249 | 257 |
| 250 } // namespace content | 258 } // namespace content |
| 251 | 259 |
| 252 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 260 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |