OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 // ReportingService specialized to report UKM metrics. | 5 // ReportingService specialized to report UKM metrics. |
6 | 6 |
7 #include "components/ukm/ukm_reporting_service.h" | 7 #include "components/ukm/ukm_reporting_service.h" |
8 | 8 |
9 #include "base/metrics/field_trial_params.h" | 9 #include "base/metrics/field_trial_params.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 void UkmReportingService::LogCellularConstraint(bool upload_canceled) { | 86 void UkmReportingService::LogCellularConstraint(bool upload_canceled) { |
87 UMA_HISTOGRAM_BOOLEAN("UKM.LogUpload.Canceled.CellularConstraint", | 87 UMA_HISTOGRAM_BOOLEAN("UKM.LogUpload.Canceled.CellularConstraint", |
88 upload_canceled); | 88 upload_canceled); |
89 } | 89 } |
90 | 90 |
91 void UkmReportingService::LogResponseCode(int response_code) { | 91 void UkmReportingService::LogResponseCode(int response_code) { |
92 UMA_HISTOGRAM_SPARSE_SLOWLY("UKM.Upload.ResponseCode", response_code); | 92 UMA_HISTOGRAM_SPARSE_SLOWLY("UKM.Upload.ResponseCode", response_code); |
93 } | 93 } |
94 | 94 |
| 95 void UkmReportingService::LogErrorCode(int error_code) { |
| 96 UMA_HISTOGRAM_SPARSE_SLOWLY("UKM.FailedUploadErrorCode", -error_code); |
| 97 } |
| 98 |
95 void UkmReportingService::LogSuccess(size_t log_size) { | 99 void UkmReportingService::LogSuccess(size_t log_size) { |
96 UMA_HISTOGRAM_COUNTS_10000("UKM.LogSize.OnSuccess", log_size / 1024); | 100 UMA_HISTOGRAM_COUNTS_10000("UKM.LogSize.OnSuccess", log_size / 1024); |
97 } | 101 } |
98 | 102 |
99 void UkmReportingService::LogLargeRejection(size_t log_size) {} | 103 void UkmReportingService::LogLargeRejection(size_t log_size) {} |
100 | 104 |
101 } // namespace metrics | 105 } // namespace metrics |
OLD | NEW |