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_functions.h" | 8 #include "base/metrics/histogram_functions.h" |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 } | 917 } |
918 } | 918 } |
919 | 919 |
920 void RecordSavePackageEvent(SavePackageEvent event) { | 920 void RecordSavePackageEvent(SavePackageEvent event) { |
921 UMA_HISTOGRAM_ENUMERATION("Download.SavePackage", | 921 UMA_HISTOGRAM_ENUMERATION("Download.SavePackage", |
922 event, | 922 event, |
923 SAVE_PACKAGE_LAST_ENTRY); | 923 SAVE_PACKAGE_LAST_ENTRY); |
924 } | 924 } |
925 | 925 |
926 void RecordOriginStateOnResumption(bool is_partial, | 926 void RecordOriginStateOnResumption(bool is_partial, |
927 int state) { | 927 OriginStateOnResumption state) { |
928 if (is_partial) | 928 if (is_partial) |
929 UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnPartialResumption", state, | 929 UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnPartialResumption", state, |
930 ORIGIN_STATE_ON_RESUMPTION_MAX); | 930 ORIGIN_STATE_ON_RESUMPTION_MAX); |
931 else | 931 else |
932 UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnFullResumption", state, | 932 UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnFullResumption", state, |
933 ORIGIN_STATE_ON_RESUMPTION_MAX); | 933 ORIGIN_STATE_ON_RESUMPTION_MAX); |
934 } | 934 } |
935 | 935 |
936 namespace { | 936 namespace { |
937 | 937 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 } | 989 } |
990 | 990 |
991 void RecordDownloadHttpResponseCode(int response_code) { | 991 void RecordDownloadHttpResponseCode(int response_code) { |
992 UMA_HISTOGRAM_CUSTOM_ENUMERATION( | 992 UMA_HISTOGRAM_CUSTOM_ENUMERATION( |
993 "Download.HttpResponseCode", | 993 "Download.HttpResponseCode", |
994 net::HttpUtil::MapStatusCodeForHistogram(response_code), | 994 net::HttpUtil::MapStatusCodeForHistogram(response_code), |
995 net::HttpUtil::GetStatusCodesForHistogram()); | 995 net::HttpUtil::GetStatusCodesForHistogram()); |
996 } | 996 } |
997 | 997 |
998 } // namespace content | 998 } // namespace content |
OLD | NEW |