OLD | NEW |
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 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #import <AddressBook/AddressBook.h> | 9 #import <AddressBook/AddressBook.h> |
10 | 10 |
11 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
| 12 #include "base/guid.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
15 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
16 #include "base/sys_string_conversions.h" | 17 #include "base/sys_string_conversions.h" |
17 #include "chrome/browser/autofill/autofill_profile.h" | 18 #include "chrome/browser/autofill/autofill_profile.h" |
18 #include "chrome/browser/autofill/phone_number.h" | 19 #include "chrome/browser/autofill/phone_number.h" |
19 #include "chrome/common/guid.h" | |
20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
21 #include "ui/base/l10n/l10n_util_mac.h" | 21 #include "ui/base/l10n/l10n_util_mac.h" |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // This implementation makes use of the Address Book API. Profiles are | 25 // This implementation makes use of the Address Book API. Profiles are |
26 // generated that correspond to addresses in the "me" card that reside in the | 26 // generated that correspond to addresses in the "me" card that reside in the |
27 // user's Address Book. The caller passes a vector of profiles into the | 27 // user's Address Book. The caller passes a vector of profiles into the |
28 // the constructer and then initiate the fetch from the Mac Address Book "me" | 28 // the constructer and then initiate the fetch from the Mac Address Book "me" |
29 // card using the main |GetAddressBookMeCard()| method. This clears any | 29 // card using the main |GetAddressBookMeCard()| method. This clears any |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 } // namespace | 241 } // namespace |
242 | 242 |
243 // Populate |auxiliary_profiles_| with the Address Book data. | 243 // Populate |auxiliary_profiles_| with the Address Book data. |
244 void PersonalDataManager::LoadAuxiliaryProfiles() const { | 244 void PersonalDataManager::LoadAuxiliaryProfiles() const { |
245 AuxiliaryProfilesImpl impl(&auxiliary_profiles_); | 245 AuxiliaryProfilesImpl impl(&auxiliary_profiles_); |
246 impl.GetAddressBookMeCard(); | 246 impl.GetAddressBookMeCard(); |
247 } | 247 } |
OLD | NEW |