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

Side by Side Diff: chrome/browser/autofill/personal_data_manager_mac.mm

Issue 7648022: Added kAPPhoneMobileLabel and kABPhoneMainLabel in GetAddressBookPhoneNumbers. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autofill/personal_data_manager.h" 5 #include "chrome/browser/autofill/personal_data_manager.h"
6 6
7 #import <AddressBook/AddressBook.h> 7 #import <AddressBook/AddressBook.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } else if ([addressLabelRaw isEqualToString:kABAddressWorkLabel] && 207 } else if ([addressLabelRaw isEqualToString:kABAddressWorkLabel] &&
208 [phoneLabelRaw isEqualToString:kABPhoneWorkLabel]) { 208 [phoneLabelRaw isEqualToString:kABPhoneWorkLabel]) {
209 string16 workPhone = base::SysNSStringToUTF16( 209 string16 workPhone = base::SysNSStringToUTF16(
210 [phoneNumbers valueAtIndex:reverseK]); 210 [phoneNumbers valueAtIndex:reverseK]);
211 profile->SetInfo(PHONE_HOME_WHOLE_NUMBER, workPhone); 211 profile->SetInfo(PHONE_HOME_WHOLE_NUMBER, workPhone);
212 } else if ([addressLabelRaw isEqualToString:kABAddressWorkLabel] && 212 } else if ([addressLabelRaw isEqualToString:kABAddressWorkLabel] &&
213 [phoneLabelRaw isEqualToString:kABPhoneWorkFAXLabel]) { 213 [phoneLabelRaw isEqualToString:kABPhoneWorkFAXLabel]) {
214 string16 workFax = base::SysNSStringToUTF16( 214 string16 workFax = base::SysNSStringToUTF16(
215 [phoneNumbers valueAtIndex:reverseK]); 215 [phoneNumbers valueAtIndex:reverseK]);
216 profile->SetInfo(PHONE_FAX_WHOLE_NUMBER, workFax); 216 profile->SetInfo(PHONE_FAX_WHOLE_NUMBER, workFax);
217 } else if ([phoneLabelRaw isEqualToString:kABPhoneMobileLabel] ||
218 [phoneLabelRaw isEqualToString:kABPhoneMainLabel]) {
219 string16 phone = base::SysNSStringToUTF16(
220 [phoneNumbers valueAtIndex:reverseK]);
221 profile->SetInfo(PHONE_HOME_WHOLE_NUMBER, phone);
217 } 222 }
218 } 223 }
219 } 224 }
220 225
221 } // namespace 226 } // namespace
222 227
223 // Populate |auxiliary_profiles_| with the Address Book data. 228 // Populate |auxiliary_profiles_| with the Address Book data.
224 void PersonalDataManager::LoadAuxiliaryProfiles() const { 229 void PersonalDataManager::LoadAuxiliaryProfiles() const {
225 AuxiliaryProfilesImpl impl(&auxiliary_profiles_); 230 AuxiliaryProfilesImpl impl(&auxiliary_profiles_);
226 impl.GetAddressBookMeCard(); 231 impl.GetAddressBookMeCard();
227 } 232 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698