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

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

Issue 1694443004: [Autofill] Add credit card first and last name heuristics predictions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/form_structure.cc
diff --git a/components/autofill/core/browser/form_structure.cc b/components/autofill/core/browser/form_structure.cc
index 5260c12a3ba07b39ca689b860087a8d94c152e5f..2b1a3121935c44c2bc075db85b5091195c053d9c 100644
--- a/components/autofill/core/browser/form_structure.cc
+++ b/components/autofill/core/browser/form_structure.cc
@@ -209,7 +209,13 @@ HtmlFieldType FieldTypeFromAutocompleteAttributeValue(
}
if (autocomplete_attribute_value == "cc-name")
- return HTML_TYPE_CREDIT_CARD_NAME;
+ return HTML_TYPE_CREDIT_CARD_NAME_FULL;
+
+ if (autocomplete_attribute_value == "cc-given-name")
+ return HTML_TYPE_CREDIT_CARD_NAME_FIRST;
+
+ if (autocomplete_attribute_value == "cc-family-name")
+ return HTML_TYPE_CREDIT_CARD_NAME_LAST;
if (autocomplete_attribute_value == "cc-number")
return HTML_TYPE_CREDIT_CARD_NUMBER;
« no previous file with comments | « components/autofill/core/browser/field_types.h ('k') | components/autofill/core/browser/form_structure_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698