| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 // Records the bandwidth for parallelizable download and estimates the saved | 269 // Records the bandwidth for parallelizable download and estimates the saved |
| 270 // time at the file end. Does not count in any hash computation or file | 270 // time at the file end. Does not count in any hash computation or file |
| 271 // open/close time. | 271 // open/close time. |
| 272 void RecordParallelizableDownloadStats( | 272 void RecordParallelizableDownloadStats( |
| 273 size_t bytes_downloaded_with_parallel_streams, | 273 size_t bytes_downloaded_with_parallel_streams, |
| 274 base::TimeDelta time_with_parallel_streams, | 274 base::TimeDelta time_with_parallel_streams, |
| 275 size_t bytes_downloaded_without_parallel_streams, | 275 size_t bytes_downloaded_without_parallel_streams, |
| 276 base::TimeDelta time_without_parallel_streams, | 276 base::TimeDelta time_without_parallel_streams, |
| 277 bool uses_parallel_requests); | 277 bool uses_parallel_requests); |
| 278 | 278 |
| 279 // Records the average bandwidth, time, and file size for parallelizable |
| 280 // download. |
| 281 CONTENT_EXPORT void RecordParallelizableDownloadAverageStats( |
| 282 int64_t bytes_downloaded, |
| 283 const base::TimeDelta& time_span); |
| 284 |
| 279 // Records the parallel download creation counts and the reasons why the | 285 // Records the parallel download creation counts and the reasons why the |
| 280 // download falls back to non-parallel download. | 286 // download falls back to non-parallel download. |
| 281 void RecordParallelDownloadCreationEvent(ParallelDownloadCreationEvent event); | 287 void RecordParallelDownloadCreationEvent(ParallelDownloadCreationEvent event); |
| 282 | 288 |
| 283 // Record the result of a download file rename. | 289 // Record the result of a download file rename. |
| 284 void RecordDownloadFileRenameResultAfterRetry( | 290 void RecordDownloadFileRenameResultAfterRetry( |
| 285 base::TimeDelta time_since_first_failure, | 291 base::TimeDelta time_since_first_failure, |
| 286 DownloadInterruptReason interrupt_reason); | 292 DownloadInterruptReason interrupt_reason); |
| 287 | 293 |
| 288 enum SavePackageEvent { | 294 enum SavePackageEvent { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 const std::vector<GURL>& url_chain); | 329 const std::vector<GURL>& url_chain); |
| 324 | 330 |
| 325 void RecordDownloadSourcePageTransitionType( | 331 void RecordDownloadSourcePageTransitionType( |
| 326 const base::Optional<ui::PageTransition>& transition); | 332 const base::Optional<ui::PageTransition>& transition); |
| 327 | 333 |
| 328 void RecordDownloadHttpResponseCode(int response_code); | 334 void RecordDownloadHttpResponseCode(int response_code); |
| 329 | 335 |
| 330 } // namespace content | 336 } // namespace content |
| 331 | 337 |
| 332 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 338 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |