Chromium Code Reviews| Index: chrome/browser/autofill/personal_data_manager_mac.mm |
| diff --git a/chrome/browser/autofill/personal_data_manager_mac.mm b/chrome/browser/autofill/personal_data_manager_mac.mm |
| index 88df9a5a30e6cc5fbe980ec51014ac858015f994..baa1fb6a8b49efcd86efca6f6d03ecaea7f283cf 100644 |
| --- a/chrome/browser/autofill/personal_data_manager_mac.mm |
| +++ b/chrome/browser/autofill/personal_data_manager_mac.mm |
| @@ -31,15 +31,15 @@ namespace { |
| // card using the main |GetAddressBookMeCard()| method. This clears any |
| // existing addresses and populates new addresses derived from the data found |
| // in the "me" card. |
|
Yaron
2013/02/28 20:40:43
This is awkward. We shouldn't have "Android" in mm
apiccion
2013/03/01 01:04:34
Oops!
|
| -class AuxiliaryProfilesImpl { |
| +class AuxiliaryProfilesAndroid { |
| public: |
| // Constructor takes a reference to the |profiles| that will be filled in |
| // by the subsequent call to |GetAddressBookMeCard()|. |profiles| may not |
| // be NULL. |
| - explicit AuxiliaryProfilesImpl(ScopedVector<AutofillProfile>* profiles) |
| + explicit AuxiliaryProfilesAndroid(ScopedVector<AutofillProfile>* profiles) |
| : profiles_(*profiles) { |
| } |
| - virtual ~AuxiliaryProfilesImpl() {} |
| + virtual ~AuxiliaryProfilesAndroid() {} |
| // Import the "me" card from the Mac Address Book and fill in |profiles_|. |
| void GetAddressBookMeCard(); |
| @@ -60,14 +60,14 @@ class AuxiliaryProfilesImpl { |
| // A reference to the profiles this class populates. |
| ScopedVector<AutofillProfile>& profiles_; |
| - DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfilesImpl); |
| + DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfilesAndroid); |
| }; |
| // This method uses the |ABAddressBook| system service to fetch the "me" card |
| // from the active user's address book. It looks for the user address |
| // information and translates it to the internal list of |AutofillProfile| data |
| // structures. |
| -void AuxiliaryProfilesImpl::GetAddressBookMeCard() { |
| +void AuxiliaryProfilesAndroid::GetAddressBookMeCard() { |
| profiles_.clear(); |
| // +[ABAddressBook sharedAddressBook] throws an exception internally in |
| @@ -136,7 +136,7 @@ void AuxiliaryProfilesImpl::GetAddressBookMeCard() { |
| // Name and company information is stored once in the Address Book against |
| // multiple addresses. We replicate that information for each profile. |
| // We only propagate the company name to work profiles. |
| -void AuxiliaryProfilesImpl::GetAddressBookNames( |
| +void AuxiliaryProfilesAndroid::GetAddressBookNames( |
| ABPerson* me, |
| NSString* addressLabelRaw, |
| AutofillProfile* profile) { |
| @@ -157,7 +157,7 @@ void AuxiliaryProfilesImpl::GetAddressBookNames( |
| // second line we join with commas. |
| // For example: "c/o John Doe\n1122 Other Avenue\nApt #7" translates to |
| // line 1: "c/o John Doe", line 2: "1122 Other Avenue, Apt #7". |
| -void AuxiliaryProfilesImpl::GetAddressBookAddress(NSDictionary* address, |
| +void AuxiliaryProfilesAndroid::GetAddressBookAddress(NSDictionary* address, |
| AutofillProfile* profile) { |
| if (NSString* addressField = [address objectForKey:kABAddressStreetKey]) { |
| // If there are newlines in the address, split into two lines. |
| @@ -203,7 +203,7 @@ void AuxiliaryProfilesImpl::GetAddressBookAddress(NSDictionary* address, |
| // Fills in email address matching current address label. Note that there may |
| // be multiple matching email addresses for a given label. We take the |
| // first we find (topmost) as preferred. |
| -void AuxiliaryProfilesImpl::GetAddressBookEmail( |
| +void AuxiliaryProfilesAndroid::GetAddressBookEmail( |
| ABPerson* me, |
| NSString* addressLabelRaw, |
| AutofillProfile* profile) { |
| @@ -224,7 +224,7 @@ void AuxiliaryProfilesImpl::GetAddressBookEmail( |
| // We match two cases: home/tel, work/tel. |
| // Note, we traverse in reverse order so that top values in address book |
| // take priority. |
| -void AuxiliaryProfilesImpl::GetAddressBookPhoneNumbers( |
| +void AuxiliaryProfilesAndroid::GetAddressBookPhoneNumbers( |
| ABPerson* me, |
| NSString* addressLabelRaw, |
| AutofillProfile* profile) { |
| @@ -256,6 +256,6 @@ void AuxiliaryProfilesImpl::GetAddressBookPhoneNumbers( |
| // Populate |auxiliary_profiles_| with the Address Book data. |
| void PersonalDataManager::LoadAuxiliaryProfiles() { |
| - AuxiliaryProfilesImpl impl(&auxiliary_profiles_); |
| + AuxiliaryProfilesAndroid impl(&auxiliary_profiles_); |
| impl.GetAddressBookMeCard(); |
| } |