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

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: Comment fix. 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
« no previous file with comments | « chrome/browser/autofill/home_phone_number.cc ('k') | chrome/browser/autofill/personal_data_manager_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dd8ee30e9f7c88cf7465c3ccf47a50a1fed76cba 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -103,11 +103,8 @@ bool IsValidFieldTypeAndValue(const std::set<AutofillFieldType>& types_seen,
// This indicates ambiguous data or miscategorization of types.
// 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) {
+ if (types_seen.count(field_type) && field_type != PHONE_HOME_NUMBER)
return false;
- }
// Abandon the import if an email address value shows up in a field that is
// not an email address.
@@ -217,8 +214,7 @@ 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);
+ PhoneNumber::PhoneCombineHelper home;
for (size_t i = 0; i < form.field_count(); ++i) {
const AutofillField* field = form.field(i);
@@ -253,9 +249,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 +263,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 +273,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.
« no previous file with comments | « chrome/browser/autofill/home_phone_number.cc ('k') | chrome/browser/autofill/personal_data_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698