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/browser/android/auxiliary_profile_loader_android.h
" |
8 #include "components/autofill/browser/android/auxiliary_profiles_android.h" | 8 #include "components/autofill/browser/android/auxiliary_profiles_android.h" |
9 #include "components/autofill/browser/personal_data_manager.h" | 9 #include "components/autofill/browser/personal_data_manager.h" |
10 | 10 |
| 11 // TODO(jam) remove once https://codereview.chromium.org/13488009/ lands, since |
| 12 // that brings localle to PDM. |
| 13 #include "content/public/browser/content_browser_client.h" |
| 14 |
11 void PersonalDataManager::LoadAuxiliaryProfiles() { | 15 void PersonalDataManager::LoadAuxiliaryProfiles() { |
12 auxiliary_profiles_.clear(); | 16 auxiliary_profiles_.clear(); |
13 autofill::AuxiliaryProfileLoaderAndroid profile_loader; | 17 autofill::AuxiliaryProfileLoaderAndroid profile_loader; |
14 profile_loader.Init( | 18 profile_loader.Init( |
15 base::android::AttachCurrentThread(), | 19 base::android::AttachCurrentThread(), |
16 base::android::GetApplicationContext()); | 20 base::android::GetApplicationContext()); |
17 if (profile_loader.GetHasPermissions()) { | 21 if (profile_loader.GetHasPermissions()) { |
18 autofill::AuxiliaryProfilesAndroid impl(profile_loader); | 22 autofill::AuxiliaryProfilesAndroid impl( |
| 23 profile_loader, |
| 24 // TODO(jam) remove once https://codereview.chromium.org/13488009/ |
| 25 // lands, since that brings localle to PDM. |
| 26 content::GetContentClient()->browser()->GetApplicationLocale()); |
19 auxiliary_profiles_.push_back(impl.LoadContactsProfile().release()); | 27 auxiliary_profiles_.push_back(impl.LoadContactsProfile().release()); |
20 } | 28 } |
21 } | 29 } |
OLD | NEW |