1 // Copyright 2015 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_UTIL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_UTIL_H_ 7 8 #include <map> 9 #include <memory> 10 #include <string> 11 12 #include "base/macros.h" 13 #include "chrome/common/extensions/api/autofill_private.h" 14 #include "components/autofill/core/browser/personal_data_manager.h" 15 16 namespace extensions { 17 18 namespace autofill_util { 19 20 using AddressEntryList = std::vector<api::autofill_private::AddressEntry>; 21 using CountryEntryList = std::vector<api::autofill_private::CountryEntry>; 22 using CreditCardEntryList = std::vector<api::autofill_private::CreditCardEntry>; 23 24 // Uses |personal_data| to generate a list of up-to-date AddressEntry objects. 25 AddressEntryList GenerateAddressList( 26 const autofill::PersonalDataManager& personal_data); 27 28 // Uses |personal_data| to generate a list of up-to-date CountryEntry objects. 29 CountryEntryList GenerateCountryList( 30 const autofill::PersonalDataManager& personal_data); 31 32 // Uses |personal_data| to generate a list of up-to-date CreditCardEntry 33 // objects. 34 CreditCardEntryList GenerateCreditCardList( 35 const autofill::PersonalDataManager& personal_data); 36 37 } // namespace autofill_util 38 39 } // namespace extensions 40 41 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_UTIL_H_ 42