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

Unified Diff: chrome/browser/autofill/personal_data_manager.cc

Issue 7892048: Autofill: Remove fax number completely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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: chrome/browser/autofill/personal_data_manager.cc
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index 648c3d44d902b320f2826593863e1703f39526fa..f85efe586111cf3582b395c2ef60c96ce203bfb4 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -104,8 +104,7 @@ bool IsValidFieldTypeAndValue(const std::set<AutofillFieldType>& types_seen,
// Make an exception for PHONE_HOME_NUMBER however as both prefix and
// suffix are stored against this type.
if (types_seen.count(field_type) &&
- field_type != PHONE_HOME_NUMBER &&
- field_type != PHONE_FAX_NUMBER) {
+ field_type != PHONE_HOME_NUMBER) {
Ilya Sherman 2011/09/15 03:47:08 nit: I think this can now all fit on one line.
James Hawkins 2011/09/16 03:23:28 Done.
return false;
}
@@ -218,7 +217,6 @@ bool PersonalDataManager::ImportFormData(
// We only set complete phone, so aggregate phone parts in these vars and set
// complete at the end.
PhoneNumber::PhoneCombineHelper home(AutofillType::PHONE_HOME);
- PhoneNumber::PhoneCombineHelper fax(AutofillType::PHONE_FAX);
for (size_t i = 0; i < form.field_count(); ++i) {
const AutofillField* field = form.field(i);
@@ -253,9 +251,9 @@ bool PersonalDataManager::ImportFormData(
} else {
// We need to store phone data in the variables, before building the whole
// number at the end. The rest of the fields are set "as is".
- // If the fields are not the phone fields in question both home.SetInfo()
- // and fax.SetInfo() are going to return false.
- if (!home.SetInfo(field_type, value) && !fax.SetInfo(field_type, value))
+ // If the fields are not the phone fields in question home.SetInfo() is
+ // going to return false.
+ if (!home.SetInfo(field_type, value))
imported_profile->SetCanonicalizedInfo(field_type, value);
// Reject profiles with invalid country information.
@@ -267,8 +265,7 @@ bool PersonalDataManager::ImportFormData(
}
}
- // Construct the phone and fax numbers. Reject the profile if either number
- // is invalid.
+ // Construct the phone number. Reject the profile if the number is invalid.
if (imported_profile.get() && !home.IsEmpty()) {
string16 constructed_number;
if (!home.ParseNumber(imported_profile->CountryCode(),
@@ -278,15 +275,6 @@ bool PersonalDataManager::ImportFormData(
imported_profile.reset();
}
}
- if (imported_profile.get() && !fax.IsEmpty()) {
- string16 constructed_number;
- if (!fax.ParseNumber(imported_profile->CountryCode(),
- &constructed_number) ||
- !imported_profile->SetCanonicalizedInfo(PHONE_FAX_WHOLE_NUMBER,
- constructed_number)) {
- imported_profile.reset();
- }
- }
// Reject the profile if minimum address and validation requirements are not
// met.

Powered by Google App Engine
This is Rietveld 408576698