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

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: Patch2 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 feb1ddc7dbb1755bb0a175bc3a3ce69c7afa1b31..b5964c563159ad5114aa0e8f750c35831226e9ad 100644
--- a/components/autofill/core/browser/form_structure.cc
+++ b/components/autofill/core/browser/form_structure.cc
@@ -208,7 +208,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;

Powered by Google App Engine
This is Rietveld 408576698