Chromium Code Reviews| Index: ios/chrome/browser/payments/payment_request_util.h |
| diff --git a/ios/chrome/browser/payments/payment_request_util.h b/ios/chrome/browser/payments/payment_request_util.h |
| index 88fd9ee0b838b508ada0d8f1947f39e3871f82f0..539926edea2f99a591132dc568b4e3030a02b6ac 100644 |
| --- a/ios/chrome/browser/payments/payment_request_util.h |
| +++ b/ios/chrome/browser/payments/payment_request_util.h |
| @@ -7,11 +7,14 @@ |
| #import <Foundation/Foundation.h> |
| +#include <vector> |
| + |
| #include "base/strings/string16.h" |
| #include "components/payments/core/payment_options_provider.h" |
| namespace autofill { |
| class AutofillProfile; |
| +class CreditCard; |
| } // namespace autofill |
| class PaymentRequest; |
| @@ -49,6 +52,18 @@ NSString* GetAddressNotificationLabelFromAutofillProfile( |
| PaymentRequest& payment_request, |
| const autofill::AutofillProfile& profile); |
| +// Returns whether the credit card is complete to be used as a payment method |
| +// without further editing. |
| +BOOL IsCreditCardCompleteForPayment( |
| + const autofill::CreditCard& credit_card, |
| + const std::vector<autofill::AutofillProfile*> billing_profiles); |
|
please use gerrit instead
2017/06/26 17:54:21
const-ref to avoid copying std::vector.
Moe
2017/06/26 20:18:00
Done.
|
| + |
| +// Helper function to create a notification label for what's missing from a |
| +// credit card. Returns nil if the resulting label is empty. |
| +NSString* GetPaymentMethodNotificationLabelFromCreditCard( |
| + const autofill::CreditCard& credit_card, |
| + const std::vector<autofill::AutofillProfile*> billing_profiles); |
|
please use gerrit instead
2017/06/26 17:54:21
const-ref to avoid copying std::vector.
Moe
2017/06/26 20:18:00
Done.
|
| + |
| // Returns the title for the shipping section of the payment summary view given |
| // the shipping type specified in |payment_request|. |
| NSString* GetShippingSectionTitle(payments::PaymentShippingType shipping_type); |