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

Unified Diff: components/autofill/core/browser/autofill_type.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/autofill_type.cc
diff --git a/components/autofill/core/browser/autofill_type.cc b/components/autofill/core/browser/autofill_type.cc
index 2341d9452a2740f2db02b2845dbf9a5ebf046de3..d10bc04abaea1e02c794e5df22c1bf1dcf1d36e7 100644
--- a/components/autofill/core/browser/autofill_type.cc
+++ b/components/autofill/core/browser/autofill_type.cc
@@ -157,6 +157,7 @@ FieldTypeGroup AutofillType::group() const {
case HTML_TYPE_COUNTRY_CODE:
case HTML_TYPE_COUNTRY_NAME:
case HTML_TYPE_POSTAL_CODE:
+ case HTML_TYPE_FULL_ADDRESS:
return html_mode_ == HTML_MODE_BILLING ? ADDRESS_BILLING : ADDRESS_HOME;
case HTML_TYPE_CREDIT_CARD_NAME:
@@ -309,6 +310,10 @@ ServerFieldType AutofillType::GetStorableType() const {
case HTML_TYPE_POSTAL_CODE:
return ADDRESS_HOME_ZIP;
+ // Full address is composed of other types; it can't be stored.
+ case HTML_TYPE_FULL_ADDRESS:
+ return UNKNOWN_TYPE;
+
case HTML_TYPE_CREDIT_CARD_NAME:
return CREDIT_CARD_NAME;
@@ -614,6 +619,8 @@ std::string AutofillType::ToString() const {
return "HTML_TYPE_COUNTRY_NAME";
case HTML_TYPE_POSTAL_CODE:
return "HTML_TYPE_POSTAL_CODE";
+ case HTML_TYPE_FULL_ADDRESS:
+ return "HTML_TYPE_FULL_ADDRESS";
case HTML_TYPE_CREDIT_CARD_NAME:
return "HTML_TYPE_CREDIT_CARD_NAME";
case HTML_TYPE_CREDIT_CARD_NUMBER:
« no previous file with comments | « components/autofill/core/browser/autofill_profile_unittest.cc ('k') | components/autofill/core/browser/field_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698