| 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/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/metrics/sparse_histogram.h" | 9 #include "base/metrics/sparse_histogram.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 void RecordOpen(const base::Time& end, bool first) { | 686 void RecordOpen(const base::Time& end, bool first) { |
| 687 if (!end.is_null()) { | 687 if (!end.is_null()) { |
| 688 UMA_HISTOGRAM_LONG_TIMES("Download.OpenTime", (base::Time::Now() - end)); | 688 UMA_HISTOGRAM_LONG_TIMES("Download.OpenTime", (base::Time::Now() - end)); |
| 689 if (first) { | 689 if (first) { |
| 690 UMA_HISTOGRAM_LONG_TIMES("Download.FirstOpenTime", | 690 UMA_HISTOGRAM_LONG_TIMES("Download.FirstOpenTime", |
| 691 (base::Time::Now() - end)); | 691 (base::Time::Now() - end)); |
| 692 } | 692 } |
| 693 } | 693 } |
| 694 } | 694 } |
| 695 | 695 |
| 696 void RecordClearAllSize(int size) { | |
| 697 UMA_HISTOGRAM_CUSTOM_COUNTS("Download.ClearAllSize", | |
| 698 size, | |
| 699 1/*min*/, | |
| 700 (1 << 10)/*max*/, | |
| 701 32/*num_buckets*/); | |
| 702 } | |
| 703 | |
| 704 void RecordOpensOutstanding(int size) { | 696 void RecordOpensOutstanding(int size) { |
| 705 UMA_HISTOGRAM_CUSTOM_COUNTS("Download.OpensOutstanding", | 697 UMA_HISTOGRAM_CUSTOM_COUNTS("Download.OpensOutstanding", |
| 706 size, | 698 size, |
| 707 1/*min*/, | 699 1/*min*/, |
| 708 (1 << 10)/*max*/, | 700 (1 << 10)/*max*/, |
| 709 64/*num_buckets*/); | 701 64/*num_buckets*/); |
| 710 } | 702 } |
| 711 | 703 |
| 712 void RecordContiguousWriteTime(base::TimeDelta time_blocked) { | 704 void RecordContiguousWriteTime(base::TimeDelta time_blocked) { |
| 713 UMA_HISTOGRAM_TIMES("Download.FileThreadBlockedTime", time_blocked); | 705 UMA_HISTOGRAM_TIMES("Download.FileThreadBlockedTime", time_blocked); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 : DOWNLOAD_REDIRECT_INSECURE | 805 : DOWNLOAD_REDIRECT_INSECURE |
| 814 : is_redirect_chain_secure ? DOWNLOAD_TARGET_INSECURE | 806 : is_redirect_chain_secure ? DOWNLOAD_TARGET_INSECURE |
| 815 : DOWNLOAD_REDIRECT_TARGET_INSECURE; | 807 : DOWNLOAD_REDIRECT_TARGET_INSECURE; |
| 816 } | 808 } |
| 817 | 809 |
| 818 UMA_HISTOGRAM_ENUMERATION("Download.TargetConnectionSecurity", state, | 810 UMA_HISTOGRAM_ENUMERATION("Download.TargetConnectionSecurity", state, |
| 819 DOWNLOAD_CONNECTION_SECURITY_MAX); | 811 DOWNLOAD_CONNECTION_SECURITY_MAX); |
| 820 } | 812 } |
| 821 | 813 |
| 822 } // namespace content | 814 } // namespace content |
| OLD | NEW |