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 #include "content/browser/download/download_stats.h" | 5 #include "content/browser/download/download_stats.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/metrics/sparse_histogram.h" | 8 #include "base/metrics/sparse_histogram.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "content/browser/download/download_resource_handler.h" | 10 #include "content/browser/download/download_resource_handler.h" |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 UMA_HISTOGRAM_COUNTS_100("Download.DiskBandwidthUsedPercentage", | 604 UMA_HISTOGRAM_COUNTS_100("Download.DiskBandwidthUsedPercentage", |
605 disk_write_time_ms * 100 / elapsed_time_ms); | 605 disk_write_time_ms * 100 / elapsed_time_ms); |
606 } | 606 } |
607 | 607 |
608 void RecordSavePackageEvent(SavePackageEvent event) { | 608 void RecordSavePackageEvent(SavePackageEvent event) { |
609 UMA_HISTOGRAM_ENUMERATION("Download.SavePackage", | 609 UMA_HISTOGRAM_ENUMERATION("Download.SavePackage", |
610 event, | 610 event, |
611 SAVE_PACKAGE_LAST_ENTRY); | 611 SAVE_PACKAGE_LAST_ENTRY); |
612 } | 612 } |
613 | 613 |
| 614 void RecordOriginStateOnResumption(bool is_partial, |
| 615 int state) { |
| 616 if (is_partial) |
| 617 UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnPartialResumption", state, |
| 618 ORIGIN_STATE_ON_RESUMPTION_MAX); |
| 619 else |
| 620 UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnFullResumption", state, |
| 621 ORIGIN_STATE_ON_RESUMPTION_MAX); |
| 622 } |
| 623 |
614 } // namespace content | 624 } // namespace content |
OLD | NEW |