Avi Drissman | 8ba1bad | 2022-09-13 19:22:36 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors |
tmartino | 9c32cf8 | 2017-04-04 20:34:39 | [diff] [blame] | 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_PAYMENTS_CORE_STRINGS_UTIL_H_ |
| 6 | #define COMPONENTS_PAYMENTS_CORE_STRINGS_UTIL_H_ |
| 7 | |
Rouslan Solomakhin | 25d708b | 2017-06-23 17:12:03 | [diff] [blame] | 8 | #include <set> |
Rouslan Solomakhin | 33a338b49 | 2017-05-23 16:02:54 | [diff] [blame] | 9 | #include <string> |
| 10 | |
Marc-Antoine Courteau | 8ede731 | 2017-10-16 16:08:40 | [diff] [blame] | 11 | #include "build/build_config.h" |
Florian Leimgruber | 9c6a9a1f | 2025-02-27 15:09:13 | [diff] [blame] | 12 | #include "components/autofill/core/browser/data_model/payments/credit_card.h" |
tmartino | 9c32cf8 | 2017-04-04 20:34:39 | [diff] [blame] | 13 | #include "components/payments/core/payment_options_provider.h" |
| 14 | |
Rouslan Solomakhin | 33a338b49 | 2017-05-23 16:02:54 | [diff] [blame] | 15 | namespace autofill { |
| 16 | class AutofillProfile; |
| 17 | } |
| 18 | |
tmartino | 9c32cf8 | 2017-04-04 20:34:39 | [diff] [blame] | 19 | namespace payments { |
| 20 | |
Rouslan Solomakhin | 33a338b49 | 2017-05-23 16:02:54 | [diff] [blame] | 21 | // Helper function to create a shipping address label from an autofill profile. |
Jan Wilken Dörrie | fa241ba | 2021-03-11 17:57:01 | [diff] [blame] | 22 | std::u16string GetShippingAddressLabelFromAutofillProfile( |
Rouslan Solomakhin | 33a338b49 | 2017-05-23 16:02:54 | [diff] [blame] | 23 | const autofill::AutofillProfile& profile, |
| 24 | const std::string& locale); |
| 25 | |
mahmadi | 747b470 | 2017-04-11 12:34:18 | [diff] [blame] | 26 | // Gets the informational message to be displayed in the shipping address |
| 27 | // selector view when there are no valid shipping options. |
Jan Wilken Dörrie | fa241ba | 2021-03-11 17:57:01 | [diff] [blame] | 28 | std::u16string GetShippingAddressSelectorInfoMessage( |
mahmadi | 747b470 | 2017-04-11 12:34:18 | [diff] [blame] | 29 | PaymentShippingType shipping_type); |
| 30 | |
tmartino | 9c32cf8 | 2017-04-04 20:34:39 | [diff] [blame] | 31 | // Gets the appropriate display string for the Shipping Address string for the |
| 32 | // given PaymentShippingType. |
Jan Wilken Dörrie | fa241ba | 2021-03-11 17:57:01 | [diff] [blame] | 33 | std::u16string GetShippingAddressSectionString( |
tmartino | 9c32cf8 | 2017-04-04 20:34:39 | [diff] [blame] | 34 | PaymentShippingType shipping_type); |
| 35 | |
| 36 | // Gets the appropriate display string for the Shipping Option string for the |
| 37 | // given PaymentShippingType. |
Jan Wilken Dörrie | fa241ba | 2021-03-11 17:57:01 | [diff] [blame] | 38 | std::u16string GetShippingOptionSectionString( |
tmartino | 9c32cf8 | 2017-04-04 20:34:39 | [diff] [blame] | 39 | PaymentShippingType shipping_type); |
| 40 | |
tmartino | 9c32cf8 | 2017-04-04 20:34:39 | [diff] [blame] | 41 | } // namespace payments |
| 42 | |
| 43 | #endif // COMPONENTS_PAYMENTS_CORE_STRINGS_UTIL_H_ |