| 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 the number of requests that have smaller offset than the initial |
| 229 // request. |
| 230 void RecordParallelDownloadEarlyRequests(int request_count); |
| 231 |
| 232 // Record if each byte stream is successfully added to download sink. |
| 233 void RecordParallelDownloadAddStreamSuccess(bool success); |
| 234 |
| 224 // Records the bandwidth for parallel download and estimates the saved time at | 235 // 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. | 236 // the file end. Does not count in any hash computation or file open/close time. |
| 226 void RecordParallelDownloadStats( | 237 void RecordParallelDownloadStats( |
| 227 size_t bytes_downloaded_with_parallel_streams, | 238 size_t bytes_downloaded_with_parallel_streams, |
| 228 base::TimeDelta time_with_parallel_streams, | 239 base::TimeDelta time_with_parallel_streams, |
| 229 size_t bytes_downloaded_without_parallel_streams, | 240 size_t bytes_downloaded_without_parallel_streams, |
| 230 base::TimeDelta time_without_parallel_streams); | 241 base::TimeDelta time_without_parallel_streams); |
| 231 | 242 |
| 232 // Record the result of a download file rename. | 243 // Record the result of a download file rename. |
| 233 void RecordDownloadFileRenameResultAfterRetry( | 244 void RecordDownloadFileRenameResultAfterRetry( |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 281 |
| 271 void RecordDownloadConnectionSecurity(const GURL& download_url, | 282 void RecordDownloadConnectionSecurity(const GURL& download_url, |
| 272 const std::vector<GURL>& url_chain); | 283 const std::vector<GURL>& url_chain); |
| 273 | 284 |
| 274 void RecordDownloadSourcePageTransitionType( | 285 void RecordDownloadSourcePageTransitionType( |
| 275 const base::Optional<ui::PageTransition>& transition); | 286 const base::Optional<ui::PageTransition>& transition); |
| 276 | 287 |
| 277 } // namespace content | 288 } // namespace content |
| 278 | 289 |
| 279 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 290 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |