| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 // Record overall bandwidth stats at the file end. | 215 // Record overall bandwidth stats at the file end. |
| 216 // Does not count in any hash computation or file open/close time. | 216 // Does not count in any hash computation or file open/close time. |
| 217 void RecordFileBandwidth(size_t length, | 217 void RecordFileBandwidth(size_t length, |
| 218 base::TimeDelta disk_write_time, | 218 base::TimeDelta disk_write_time, |
| 219 base::TimeDelta elapsed_time); | 219 base::TimeDelta elapsed_time); |
| 220 | 220 |
| 221 // Increment one of the count for parallel download. | 221 // Increment one of the count for parallel download. |
| 222 void RecordParallelDownloadCount(DownloadCountTypes type); | 222 void RecordParallelDownloadCount(DownloadCountTypes type); |
| 223 | 223 |
| 224 // Records the actual total number of requests sent for a parallel download, |
| 225 // including the initial request. |
| 226 void RecordParallelDownloadRequestCount(int request_count); |
| 227 |
| 228 // Records if each byte stream is successfully added to download sink. |
| 229 void RecordParallelDownloadAddStreamSuccess(bool success); |
| 230 |
| 224 // Records the bandwidth for parallel download and estimates the saved time at | 231 // Records the bandwidth for parallel download and estimates the saved time at |
| 225 // the file end. Does not count in any hash computation or file open/close time. | 232 // the file end. Does not count in any hash computation or file open/close time. |
| 226 void RecordParallelDownloadStats( | 233 void RecordParallelDownloadStats( |
| 227 size_t bytes_downloaded_with_parallel_streams, | 234 size_t bytes_downloaded_with_parallel_streams, |
| 228 base::TimeDelta time_with_parallel_streams, | 235 base::TimeDelta time_with_parallel_streams, |
| 229 size_t bytes_downloaded_without_parallel_streams, | 236 size_t bytes_downloaded_without_parallel_streams, |
| 230 base::TimeDelta time_without_parallel_streams); | 237 base::TimeDelta time_without_parallel_streams); |
| 231 | 238 |
| 232 // Record the result of a download file rename. | 239 // Record the result of a download file rename. |
| 233 void RecordDownloadFileRenameResultAfterRetry( | 240 void RecordDownloadFileRenameResultAfterRetry( |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 277 |
| 271 void RecordDownloadConnectionSecurity(const GURL& download_url, | 278 void RecordDownloadConnectionSecurity(const GURL& download_url, |
| 272 const std::vector<GURL>& url_chain); | 279 const std::vector<GURL>& url_chain); |
| 273 | 280 |
| 274 void RecordDownloadSourcePageTransitionType( | 281 void RecordDownloadSourcePageTransitionType( |
| 275 const base::Optional<ui::PageTransition>& transition); | 282 const base::Optional<ui::PageTransition>& transition); |
| 276 | 283 |
| 277 } // namespace content | 284 } // namespace content |
| 278 | 285 |
| 279 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 286 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |