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