| Index: chrome/browser/autofill/phone_number.cc
|
| diff --git a/chrome/browser/autofill/phone_number.cc b/chrome/browser/autofill/phone_number.cc
|
| index abc107d6de760f20436108339d8b02684f90f1a3..768d99c974dca4a55f9708f19e3ad30337e378d6 100644
|
| --- a/chrome/browser/autofill/phone_number.cc
|
| +++ b/chrome/browser/autofill/phone_number.cc
|
| @@ -59,6 +59,7 @@ PhoneNumber::~PhoneNumber() {}
|
| PhoneNumber& PhoneNumber::operator=(const PhoneNumber& number) {
|
| if (this == &number)
|
| return *this;
|
| +
|
| phone_group_ = number.phone_group_;
|
| number_ = number.number_;
|
| profile_ = number.profile_;
|
| @@ -150,7 +151,7 @@ void PhoneNumber::GetMatchingTypes(const string16& text,
|
| FormGroup::GetMatchingTypes(stripped_text, matching_types);
|
|
|
| // For US numbers, also compare to the three-digit prefix and the four-digit
|
| - // suffix, since websites often split numbers into these two fields.
|
| + // suffix, since web sites often split numbers into these two fields.
|
| string16 number = GetCanonicalizedInfo(GetNumberType());
|
| if (locale() == "US" && number.size() == (kPrefixLength + kSuffixLength)) {
|
| string16 prefix = number.substr(kPrefixOffset, kPrefixLength);
|
| @@ -191,53 +192,23 @@ void PhoneNumber::UpdateCacheIfNeeded() const {
|
| }
|
|
|
| AutofillFieldType PhoneNumber::GetNumberType() const {
|
| - if (phone_group_ == AutofillType::PHONE_HOME)
|
| - return PHONE_HOME_NUMBER;
|
| - else if (phone_group_ == AutofillType::PHONE_FAX)
|
| - return PHONE_FAX_NUMBER;
|
| - else
|
| - NOTREACHED();
|
| - return UNKNOWN_TYPE;
|
| + return PHONE_HOME_NUMBER;
|
| }
|
|
|
| AutofillFieldType PhoneNumber::GetCityCodeType() const {
|
| - if (phone_group_ == AutofillType::PHONE_HOME)
|
| - return PHONE_HOME_CITY_CODE;
|
| - else if (phone_group_ == AutofillType::PHONE_FAX)
|
| - return PHONE_FAX_CITY_CODE;
|
| - else
|
| - NOTREACHED();
|
| - return UNKNOWN_TYPE;
|
| + return PHONE_HOME_CITY_CODE;
|
| }
|
|
|
| AutofillFieldType PhoneNumber::GetCountryCodeType() const {
|
| - if (phone_group_ == AutofillType::PHONE_HOME)
|
| - return PHONE_HOME_COUNTRY_CODE;
|
| - else if (phone_group_ == AutofillType::PHONE_FAX)
|
| - return PHONE_FAX_COUNTRY_CODE;
|
| - else
|
| - NOTREACHED();
|
| - return UNKNOWN_TYPE;
|
| + return PHONE_HOME_COUNTRY_CODE;
|
| }
|
|
|
| AutofillFieldType PhoneNumber::GetCityAndNumberType() const {
|
| - if (phone_group_ == AutofillType::PHONE_HOME)
|
| - return PHONE_HOME_CITY_AND_NUMBER;
|
| - else if (phone_group_ == AutofillType::PHONE_FAX)
|
| - return PHONE_FAX_CITY_AND_NUMBER;
|
| - else
|
| - NOTREACHED();
|
| - return UNKNOWN_TYPE;
|
| + return PHONE_HOME_CITY_AND_NUMBER;
|
| }
|
|
|
| AutofillFieldType PhoneNumber::GetWholeNumberType() const {
|
| - if (phone_group_ == AutofillType::PHONE_HOME)
|
| - return PHONE_HOME_WHOLE_NUMBER;
|
| - else if (phone_group_ == AutofillType::PHONE_FAX)
|
| - return PHONE_FAX_WHOLE_NUMBER;
|
| - else
|
| - NOTREACHED();
|
| - return UNKNOWN_TYPE;
|
| + return PHONE_HOME_WHOLE_NUMBER;
|
| }
|
|
|
| PhoneNumber::PhoneCombineHelper::PhoneCombineHelper(
|
|
|