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

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

Issue 261013010: autocomplete: add ability to get full address (hidden behind a flag). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self review Created 6 years, 7 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 2f8b83f6cd3d7b28e805bac50b39e33d3d4c7823..625b1656ebab8bceb8aa45df70aee3b3fef7669d 100644
--- a/components/autofill/core/browser/form_structure.cc
+++ b/components/autofill/core/browser/form_structure.cc
@@ -232,6 +232,14 @@ HtmlFieldType FieldTypeFromAutocompleteAttributeValue(
if (autocomplete_attribute_value == "postal-code")
return HTML_TYPE_POSTAL_CODE;
+ // content_switches.h isn't accessible from here, hence we have
+ // to copy the string literal. This should be removed soon anyway.
+ if (autocomplete_attribute_value == "address" &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ "enable-experimental-web-platform-features")) {
+ return HTML_TYPE_FULL_ADDRESS;
+ }
+
if (autocomplete_attribute_value == "cc-name")
return HTML_TYPE_CREDIT_CARD_NAME;

Powered by Google App Engine
This is Rietveld 408576698