Index: components/autofill/core/browser/address_field.cc |
diff --git a/components/autofill/core/browser/address_field.cc b/components/autofill/core/browser/address_field.cc |
index 0791eb3c9daf45029ad4f08f51c8f09ee7df2ba5..4d835c4babee0937f753c10148b59c7d2f7e3016 100644 |
--- a/components/autofill/core/browser/address_field.cc |
+++ b/components/autofill/core/browser/address_field.cc |
@@ -126,6 +126,33 @@ bool AddressField::ClassifyField(ServerFieldTypeMap* map) const { |
AddClassification(country_, ADDRESS_HOME_COUNTRY, map); |
} |
+size_t AddressField::FieldCount() const { |
+ size_t count = 0; |
+ |
+ if (company_) |
+ ++count; |
+ if (address1_) |
+ ++count; |
+ if (address2_) |
+ ++count; |
+ if (address3_) |
+ ++count; |
+ if (street_address_) |
+ ++count; |
+ if (city_) |
+ ++count; |
+ if (state_) |
+ ++count; |
+ if (zip_) |
+ ++count; |
+ if (zip4_) |
+ ++count; |
+ if (country_) |
+ ++count; |
+ |
+ return count;; |
Evan Stade
2015/01/21 22:52:49
nit: ;;
Lei Zhang
2015/01/22 08:07:36
Done.
|
+} |
+ |
bool AddressField::ParseCompany(AutofillScanner* scanner) { |
if (company_ && !company_->IsEmpty()) |
return false; |