Index: components/autofill/core/browser/address.cc |
diff --git a/components/autofill/core/browser/address.cc b/components/autofill/core/browser/address.cc |
index 5ca29290bfda5b6c4fa9f27a2866438ee7bd1a71..fc2e5a3c6ffc3429eb05d4d6e3e04d0465c3c7ff 100644 |
--- a/components/autofill/core/browser/address.cc |
+++ b/components/autofill/core/browser/address.cc |
@@ -49,6 +49,9 @@ base::string16 Address::GetRawInfo(ServerFieldType type) const { |
case ADDRESS_HOME_LINE2: |
return street_address_.size() > 1 ? street_address_[1] : base::string16(); |
+ case ADDRESS_HOME_LINE3: |
+ return street_address_.size() > 2 ? street_address_[2] : base::string16(); |
+ |
case ADDRESS_HOME_DEPENDENT_LOCALITY: |
return dependent_locality_; |
@@ -93,6 +96,13 @@ void Address::SetRawInfo(ServerFieldType type, const base::string16& value) { |
TrimStreetAddress(); |
break; |
+ case ADDRESS_HOME_LINE3: |
+ if (street_address_.size() < 3) |
+ street_address_.resize(3); |
+ street_address_[2] = value; |
+ TrimStreetAddress(); |
+ break; |
+ |
case ADDRESS_HOME_DEPENDENT_LOCALITY: |
dependent_locality_ = value; |
break; |
@@ -201,6 +211,7 @@ void Address::GetMatchingTypes(const base::string16& text, |
void Address::GetSupportedTypes(ServerFieldTypeSet* supported_types) const { |
supported_types->insert(ADDRESS_HOME_LINE1); |
supported_types->insert(ADDRESS_HOME_LINE2); |
+ supported_types->insert(ADDRESS_HOME_LINE3); |
supported_types->insert(ADDRESS_HOME_STREET_ADDRESS); |
supported_types->insert(ADDRESS_HOME_DEPENDENT_LOCALITY); |
supported_types->insert(ADDRESS_HOME_CITY); |