Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: content/browser/download/download_stats.cc

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: simplify type checking Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/download/download_stats.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/download/download_stats.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698