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

Unified Diff: chrome/browser/autofill/personal_data_manager_mac.mm

Issue 6877130: These changes *are* for review :) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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_mac.mm
===================================================================
--- chrome/browser/autofill/personal_data_manager_mac.mm (revision 85992)
+++ chrome/browser/autofill/personal_data_manager_mac.mm (working copy)
@@ -189,10 +189,6 @@
ABPerson* me,
NSString* addressLabelRaw,
AutofillProfile* profile) {
- string16 number;
- string16 city_code;
- string16 country_code;
-
ABMultiValue* phoneNumbers = [me valueForProperty:kABPhoneProperty];
for (NSUInteger k = 0, phoneCount = [phoneNumbers count];
k < phoneCount; k++) {
@@ -202,40 +198,25 @@
[phoneLabelRaw isEqualToString:kABPhoneHomeLabel]) {
string16 homePhone = base::SysNSStringToUTF16(
[phoneNumbers valueAtIndex:reverseK]);
- PhoneNumber::ParsePhoneNumber(
- homePhone, &number, &city_code, &country_code);
- profile->SetInfo(PHONE_HOME_NUMBER, number);
- profile->SetInfo(PHONE_HOME_CITY_CODE, city_code);
- profile->SetInfo(PHONE_HOME_COUNTRY_CODE, country_code);
+ profile->SetInfo(PHONE_HOME_WHOLE_NUMBER, homePhone);
} else if ([addressLabelRaw isEqualToString:kABAddressHomeLabel] &&
[phoneLabelRaw isEqualToString:kABPhoneHomeFAXLabel]) {
string16 homeFax = base::SysNSStringToUTF16(
[phoneNumbers valueAtIndex:reverseK]);
- PhoneNumber::ParsePhoneNumber(homeFax,
- &number, &city_code, &country_code);
- profile->SetInfo(PHONE_FAX_NUMBER, number);
- profile->SetInfo(PHONE_FAX_CITY_CODE, city_code);
- profile->SetInfo(PHONE_FAX_COUNTRY_CODE, country_code);
+ profile->SetInfo(PHONE_FAX_WHOLE_NUMBER, homeFax);
} else if ([addressLabelRaw isEqualToString:kABAddressWorkLabel] &&
[phoneLabelRaw isEqualToString:kABPhoneWorkLabel]) {
string16 workPhone = base::SysNSStringToUTF16(
[phoneNumbers valueAtIndex:reverseK]);
- PhoneNumber::ParsePhoneNumber(workPhone,
- &number, &city_code, &country_code);
- profile->SetInfo(PHONE_HOME_NUMBER, number);
- profile->SetInfo(PHONE_HOME_CITY_CODE, city_code);
- profile->SetInfo(PHONE_HOME_COUNTRY_CODE, country_code);
+ profile->SetInfo(PHONE_HOME_WHOLE_NUMBER, workPhone);
} else if ([addressLabelRaw isEqualToString:kABAddressWorkLabel] &&
[phoneLabelRaw isEqualToString:kABPhoneWorkFAXLabel]) {
string16 workFax = base::SysNSStringToUTF16(
[phoneNumbers valueAtIndex:reverseK]);
- PhoneNumber::ParsePhoneNumber(workFax,
- &number, &city_code, &country_code);
- profile->SetInfo(PHONE_FAX_NUMBER, number);
- profile->SetInfo(PHONE_FAX_CITY_CODE, city_code);
- profile->SetInfo(PHONE_FAX_COUNTRY_CODE, country_code);
+ profile->SetInfo(PHONE_FAX_WHOLE_NUMBER, workFax);
}
}
+ profile->NormalizePhones();
}
} // namespace
« no previous file with comments | « chrome/browser/autofill/personal_data_manager.cc ('k') | chrome/browser/autofill/personal_data_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698