OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Populates default autofill profile from user's own Android contact. | 5 // Populates default autofill profile from user's own Android contact. |
6 | 6 |
7 #include "components/autofill/browser/android/auxiliary_profile_loader_android.h
" | 7 #include "components/autofill/core/browser/android/auxiliary_profile_loader_andr
oid.h" |
8 #include "components/autofill/browser/android/auxiliary_profiles_android.h" | 8 #include "components/autofill/core/browser/android/auxiliary_profiles_android.h" |
9 #include "components/autofill/browser/personal_data_manager.h" | 9 #include "components/autofill/core/browser/personal_data_manager.h" |
10 | 10 |
11 namespace autofill { | 11 namespace autofill { |
12 | 12 |
13 void PersonalDataManager::LoadAuxiliaryProfiles() { | 13 void PersonalDataManager::LoadAuxiliaryProfiles() { |
14 auxiliary_profiles_.clear(); | 14 auxiliary_profiles_.clear(); |
15 autofill::AuxiliaryProfileLoaderAndroid profile_loader; | 15 autofill::AuxiliaryProfileLoaderAndroid profile_loader; |
16 profile_loader.Init( | 16 profile_loader.Init( |
17 base::android::AttachCurrentThread(), | 17 base::android::AttachCurrentThread(), |
18 base::android::GetApplicationContext()); | 18 base::android::GetApplicationContext()); |
19 if (profile_loader.GetHasPermissions()) { | 19 if (profile_loader.GetHasPermissions()) { |
20 autofill::AuxiliaryProfilesAndroid impl(profile_loader, app_locale_); | 20 autofill::AuxiliaryProfilesAndroid impl(profile_loader, app_locale_); |
21 auxiliary_profiles_.push_back(impl.LoadContactsProfile().release()); | 21 auxiliary_profiles_.push_back(impl.LoadContactsProfile().release()); |
22 } | 22 } |
23 } | 23 } |
24 | 24 |
25 } // namespace autofill | 25 } // namespace autofill |
OLD | NEW |