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

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

Issue 322453003: autocomplete: support address-line3, address-level{1,2,3} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update autofill_metrics.cc Created 6 years, 6 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 625b1656ebab8bceb8aa45df70aee3b3fef7669d..61588425d4e96b7e0a17170de0abbee94a60612e 100644
--- a/components/autofill/core/browser/form_structure.cc
+++ b/components/autofill/core/browser/form_structure.cc
@@ -217,11 +217,24 @@ HtmlFieldType FieldTypeFromAutocompleteAttributeValue(
if (autocomplete_attribute_value == "address-line2")
return HTML_TYPE_ADDRESS_LINE2;
+ if (autocomplete_attribute_value == "address-line3")
+ return HTML_TYPE_ADDRESS_LINE3;
+
+ // TODO(estade): remove support for "locality" and "region".
if (autocomplete_attribute_value == "locality")
- return HTML_TYPE_LOCALITY;
+ return HTML_TYPE_ADDRESS_LEVEL2;
if (autocomplete_attribute_value == "region")
- return HTML_TYPE_REGION;
+ return HTML_TYPE_ADDRESS_LEVEL1;
+
+ if (autocomplete_attribute_value == "address-level1")
+ return HTML_TYPE_ADDRESS_LEVEL1;
+
+ if (autocomplete_attribute_value == "address-level2")
+ return HTML_TYPE_ADDRESS_LEVEL2;
+
+ if (autocomplete_attribute_value == "address-level3")
+ return HTML_TYPE_ADDRESS_LEVEL3;
if (autocomplete_attribute_value == "country")
return HTML_TYPE_COUNTRY_CODE;

Powered by Google App Engine
This is Rietveld 408576698