Chromium Code Reviews| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 690 NUM_CONVERTED_ADDRESS_CONVERSION_TYPES); | 690 NUM_CONVERTED_ADDRESS_CONVERSION_TYPES); |
| 691 } | 691 } |
| 692 | 692 |
| 693 // static | 693 // static |
| 694 void AutofillMetrics::LogShowedHttpNotSecureExplanation() { | 694 void AutofillMetrics::LogShowedHttpNotSecureExplanation() { |
| 695 base::RecordAction( | 695 base::RecordAction( |
| 696 base::UserMetricsAction("Autofill_ShowedHttpNotSecureExplanation")); | 696 base::UserMetricsAction("Autofill_ShowedHttpNotSecureExplanation")); |
| 697 } | 697 } |
| 698 | 698 |
| 699 // static | 699 // static |
| 700 void AutofillMetrics::LogExplicitUpiVpaHint() { | |
| 701 UMA_HISTOGRAM_BOOLEAN("Autofill.ExplicitUpiVpaHint", true); | |
|
Mathieu
2017/03/23 11:26:22
We could use something like Autofill.DeveloperEnga
Roger McFarlane (Chromium)
2017/03/28 19:08:23
Added as an Autofill.DeveloperEngagement histogram
| |
| 702 } | |
| 703 | |
| 704 // static | |
| 700 void AutofillMetrics::LogCardUploadDecisionUkm( | 705 void AutofillMetrics::LogCardUploadDecisionUkm( |
| 701 ukm::UkmService* ukm_service, | 706 ukm::UkmService* ukm_service, |
| 702 const GURL& url, | 707 const GURL& url, |
| 703 AutofillMetrics::CardUploadDecisionMetric upload_decision) { | 708 AutofillMetrics::CardUploadDecisionMetric upload_decision) { |
| 704 if (upload_decision >= AutofillMetrics::NUM_CARD_UPLOAD_DECISION_METRICS) | 709 if (upload_decision >= AutofillMetrics::NUM_CARD_UPLOAD_DECISION_METRICS) |
| 705 return; | 710 return; |
| 706 | 711 |
| 707 // Set up as a map because the follow-up CL will add more metrics. | 712 // Set up as a map because the follow-up CL will add more metrics. |
| 708 std::map<std::string, int> metrics = { | 713 std::map<std::string, int> metrics = { |
| 709 {internal::kUKMCardUploadDecisionMetricName, | 714 {internal::kUKMCardUploadDecisionMetricName, |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 930 else if (is_server_data_available_ && !is_local_data_available_) | 935 else if (is_server_data_available_ && !is_local_data_available_) |
| 931 name += ".WithOnlyServerData"; | 936 name += ".WithOnlyServerData"; |
| 932 else if (!is_server_data_available_ && is_local_data_available_) | 937 else if (!is_server_data_available_ && is_local_data_available_) |
| 933 name += ".WithOnlyLocalData"; | 938 name += ".WithOnlyLocalData"; |
| 934 else | 939 else |
| 935 name += ".WithBothServerAndLocalData"; | 940 name += ".WithBothServerAndLocalData"; |
| 936 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); | 941 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); |
| 937 } | 942 } |
| 938 | 943 |
| 939 } // namespace autofill | 944 } // namespace autofill |
| OLD | NEW |