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

Side by Side Diff: components/ukm/ukm_reporting_service.cc

Issue 2774503002: Track network stack error codes from UMA and UKM (Closed)
Patch Set: Rebase on Created 3 years, 8 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
OLDNEW
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/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/metrics/field_trial_params.h" 10 #include "base/metrics/field_trial_params.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 metrics::MetricsLogUploader::MetricServiceType 82 metrics::MetricsLogUploader::MetricServiceType
83 UkmReportingService::service_type() const { 83 UkmReportingService::service_type() const {
84 return metrics::MetricsLogUploader::UKM; 84 return metrics::MetricsLogUploader::UKM;
85 } 85 }
86 86
87 void UkmReportingService::LogCellularConstraint(bool upload_canceled) { 87 void UkmReportingService::LogCellularConstraint(bool upload_canceled) {
88 UMA_HISTOGRAM_BOOLEAN("UKM.LogUpload.Canceled.CellularConstraint", 88 UMA_HISTOGRAM_BOOLEAN("UKM.LogUpload.Canceled.CellularConstraint",
89 upload_canceled); 89 upload_canceled);
90 } 90 }
91 91
92 void UkmReportingService::LogResponseCode(int response_code) { 92 void UkmReportingService::LogResponseOrErrorCode(int response_code,
93 UMA_HISTOGRAM_SPARSE_SLOWLY("UKM.Upload.ResponseCode", response_code); 93 int error_code) {
94 UMA_HISTOGRAM_SPARSE_SLOWLY("UKM.LogUpload.ResponseOrErrorCode",
95 response_code >= 0 ? response_code : error_code);
94 } 96 }
95 97
96 void UkmReportingService::LogSuccess(size_t log_size) { 98 void UkmReportingService::LogSuccess(size_t log_size) {
97 UMA_HISTOGRAM_COUNTS_10000("UKM.LogSize.OnSuccess", log_size / 1024); 99 UMA_HISTOGRAM_COUNTS_10000("UKM.LogSize.OnSuccess", log_size / 1024);
98 } 100 }
99 101
100 void UkmReportingService::LogLargeRejection(size_t log_size) {} 102 void UkmReportingService::LogLargeRejection(size_t log_size) {}
101 103
102 } // namespace metrics 104 } // namespace metrics
OLDNEW
« no previous file with comments | « components/ukm/ukm_reporting_service.h ('k') | ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698