| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/autofill/core/browser/autofill_metrics.h" | 5 #include "components/autofill/core/browser/autofill_metrics.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/metrics/sparse_histogram.h" | |
| 10 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 11 #include "components/autofill/core/browser/autofill_type.h" | 10 #include "components/autofill/core/browser/autofill_type.h" |
| 12 #include "components/autofill/core/browser/form_structure.h" | 11 #include "components/autofill/core/browser/form_structure.h" |
| 13 #include "components/autofill/core/common/form_data.h" | 12 #include "components/autofill/core/common/form_data.h" |
| 14 | 13 |
| 15 namespace autofill { | 14 namespace autofill { |
| 16 | 15 |
| 17 namespace { | 16 namespace { |
| 18 | 17 |
| 19 // Server experiments we support. | 18 // Server experiments we support. |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 LogUMAHistogramTimes("Wallet.ApiCallDuration." + | 379 LogUMAHistogramTimes("Wallet.ApiCallDuration." + |
| 381 WalletApiMetricToString(metric), duration); | 380 WalletApiMetricToString(metric), duration); |
| 382 } | 381 } |
| 383 | 382 |
| 384 void AutofillMetrics::LogWalletRequiredActionMetric( | 383 void AutofillMetrics::LogWalletRequiredActionMetric( |
| 385 WalletRequiredActionMetric required_action) const { | 384 WalletRequiredActionMetric required_action) const { |
| 386 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.WalletRequiredActions", | 385 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.WalletRequiredActions", |
| 387 required_action, NUM_WALLET_REQUIRED_ACTIONS); | 386 required_action, NUM_WALLET_REQUIRED_ACTIONS); |
| 388 } | 387 } |
| 389 | 388 |
| 390 void AutofillMetrics::LogWalletResponseCode(int response_code) const { | |
| 391 UMA_HISTOGRAM_SPARSE_SLOWLY("Wallet.ResponseCode", response_code); | |
| 392 } | |
| 393 | |
| 394 void AutofillMetrics::LogDeveloperEngagementMetric( | 389 void AutofillMetrics::LogDeveloperEngagementMetric( |
| 395 DeveloperEngagementMetric metric) const { | 390 DeveloperEngagementMetric metric) const { |
| 396 DCHECK_LT(metric, NUM_DEVELOPER_ENGAGEMENT_METRICS); | 391 DCHECK_LT(metric, NUM_DEVELOPER_ENGAGEMENT_METRICS); |
| 397 | 392 |
| 398 UMA_HISTOGRAM_ENUMERATION("Autofill.DeveloperEngagement", metric, | 393 UMA_HISTOGRAM_ENUMERATION("Autofill.DeveloperEngagement", metric, |
| 399 NUM_DEVELOPER_ENGAGEMENT_METRICS); | 394 NUM_DEVELOPER_ENGAGEMENT_METRICS); |
| 400 } | 395 } |
| 401 | 396 |
| 402 void AutofillMetrics::LogHeuristicTypePrediction( | 397 void AutofillMetrics::LogHeuristicTypePrediction( |
| 403 FieldTypeQualityMetric metric, | 398 FieldTypeQualityMetric metric, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 const std::string& experiment_id) const { | 504 const std::string& experiment_id) const { |
| 510 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); | 505 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); |
| 511 } | 506 } |
| 512 | 507 |
| 513 void AutofillMetrics::LogServerExperimentIdForUpload( | 508 void AutofillMetrics::LogServerExperimentIdForUpload( |
| 514 const std::string& experiment_id) const { | 509 const std::string& experiment_id) const { |
| 515 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); | 510 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); |
| 516 } | 511 } |
| 517 | 512 |
| 518 } // namespace autofill | 513 } // namespace autofill |
| OLD | NEW |