1 // Copyright 2014 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 COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_I18N_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_I18N_H_ 7 8 #include "base/callback_forward.h" 9 #include "base/memory/scoped_ptr.h" 10 #include "base/strings/string16.h" 11 12 namespace i18n { 13 namespace addressinput { 14 struct AddressData; 15 } 16 } 17 18 namespace autofill { 19 20 class AutofillProfile; 21 class AutofillType; 22 23 namespace i18n { 24 25 // Creates an AddressData object for internationalized address display or 26 // validation using |get_info| for field values. 27 scoped_ptr< ::i18n::addressinput::AddressData> CreateAddressData( 28 const base::Callback<base::string16(const AutofillType&)>& get_info); 29 30 // Creates an |AddressData| from |profile|. 31 scoped_ptr< ::i18n::addressinput::AddressData> 32 CreateAddressDataFromAutofillProfile(const AutofillProfile& profile, 33 const std::string& app_locale); 34 35 } // namespace i18n 36 } // namespace autofill 37 38 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_I18N_H_ 39