| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 // Records the bandwidth for parallelizable download and estimates the saved | 280 // Records the bandwidth for parallelizable download and estimates the saved |
| 281 // time at the file end. Does not count in any hash computation or file | 281 // time at the file end. Does not count in any hash computation or file |
| 282 // open/close time. | 282 // open/close time. |
| 283 void RecordParallelizableDownloadStats( | 283 void RecordParallelizableDownloadStats( |
| 284 size_t bytes_downloaded_with_parallel_streams, | 284 size_t bytes_downloaded_with_parallel_streams, |
| 285 base::TimeDelta time_with_parallel_streams, | 285 base::TimeDelta time_with_parallel_streams, |
| 286 size_t bytes_downloaded_without_parallel_streams, | 286 size_t bytes_downloaded_without_parallel_streams, |
| 287 base::TimeDelta time_without_parallel_streams, | 287 base::TimeDelta time_without_parallel_streams, |
| 288 bool uses_parallel_requests); | 288 bool uses_parallel_requests); |
| 289 | 289 |
| 290 // Records the average bandwidth, time, and file size for parallelizable |
| 291 // download. |
| 292 CONTENT_EXPORT void RecordParallelizableDownloadAverageStats( |
| 293 int64_t bytes_downloaded, |
| 294 const base::TimeDelta& time_span); |
| 295 |
| 290 // Records the parallel download creation counts and the reasons why the | 296 // Records the parallel download creation counts and the reasons why the |
| 291 // download falls back to non-parallel download. | 297 // download falls back to non-parallel download. |
| 292 void RecordParallelDownloadCreationEvent(ParallelDownloadCreationEvent event); | 298 void RecordParallelDownloadCreationEvent(ParallelDownloadCreationEvent event); |
| 293 | 299 |
| 294 // Record the result of a download file rename. | 300 // Record the result of a download file rename. |
| 295 void RecordDownloadFileRenameResultAfterRetry( | 301 void RecordDownloadFileRenameResultAfterRetry( |
| 296 base::TimeDelta time_since_first_failure, | 302 base::TimeDelta time_since_first_failure, |
| 297 DownloadInterruptReason interrupt_reason); | 303 DownloadInterruptReason interrupt_reason); |
| 298 | 304 |
| 299 enum SavePackageEvent { | 305 enum SavePackageEvent { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 const std::vector<GURL>& url_chain); | 340 const std::vector<GURL>& url_chain); |
| 335 | 341 |
| 336 void RecordDownloadSourcePageTransitionType( | 342 void RecordDownloadSourcePageTransitionType( |
| 337 const base::Optional<ui::PageTransition>& transition); | 343 const base::Optional<ui::PageTransition>& transition); |
| 338 | 344 |
| 339 void RecordDownloadHttpResponseCode(int response_code); | 345 void RecordDownloadHttpResponseCode(int response_code); |
| 340 | 346 |
| 341 } // namespace content | 347 } // namespace content |
| 342 | 348 |
| 343 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 349 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |