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

Unified Diff: components/autofill/core/browser/autofill_metrics.cc

Issue 2471263002: [Autofill] Add some missing types in autofill_metrics.cc (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_metrics.cc
diff --git a/components/autofill/core/browser/autofill_metrics.cc b/components/autofill/core/browser/autofill_metrics.cc
index b4ea42e27c484d53f169bf582018fc7a4d081e46..e655f7fe66f9abaff1408423c1f65e2fcf68b254 100644
--- a/components/autofill/core/browser/autofill_metrics.cc
+++ b/components/autofill/core/browser/autofill_metrics.cc
@@ -19,6 +19,8 @@ namespace autofill {
namespace {
+// Note: if adding an enum value here, update the corresponding description for
+// AutofillTypeQualityByFieldType in histograms.xml.
enum FieldTypeGroupForMetrics {
GROUP_AMBIGUOUS = 0,
GROUP_NAME,
@@ -40,6 +42,7 @@ enum FieldTypeGroupForMetrics {
GROUP_ADDRESS_LINE_3,
GROUP_USERNAME,
GROUP_STREET_ADDRESS,
+ GROUP_CREDIT_CARD_VERIFICATION,
NUM_FIELD_TYPE_GROUPS_FOR_METRICS
};
@@ -116,7 +119,7 @@ int GetFieldTypeGroupMetric(ServerFieldType field_type,
group = GROUP_ADDRESS_COUNTRY;
break;
default:
- NOTREACHED();
+ NOTREACHED() << field_type << " has no group assigned (ambiguous)";
group = GROUP_AMBIGUOUS;
break;
}
@@ -151,8 +154,11 @@ int GetFieldTypeGroupMetric(ServerFieldType field_type,
case CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR:
group = GROUP_CREDIT_CARD_DATE;
break;
+ case CREDIT_CARD_VERIFICATION_CODE:
+ group = GROUP_CREDIT_CARD_VERIFICATION;
+ break;
default:
- NOTREACHED();
+ NOTREACHED() << field_type << " has no group assigned (ambiguous)";
group = GROUP_AMBIGUOUS;
break;
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698