| Index: components/payments/core/payment_request_data_util.h
|
| diff --git a/components/payments/core/payment_request_data_util.h b/components/payments/core/payment_request_data_util.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4464fe4ef5711180a63be5e02dd6c3c87f5bc5a4
|
| --- /dev/null
|
| +++ b/components/payments/core/payment_request_data_util.h
|
| @@ -0,0 +1,43 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DATA_UTIL_H_
|
| +#define COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DATA_UTIL_H_
|
| +
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "base/strings/string16.h"
|
| +
|
| +namespace autofill {
|
| +class AutofillProfile;
|
| +class CreditCard;
|
| +} // namespace autofill
|
| +
|
| +namespace web {
|
| +class BasicCardResponse;
|
| +class PaymentAddress;
|
| +} // namespace web
|
| +
|
| +namespace payments {
|
| +namespace data_util {
|
| +
|
| +// Helper function to get an instance of web::PaymentAddress from an autofill
|
| +// profile.
|
| +web::PaymentAddress GetPaymentAddressFromAutofillProfile(
|
| + const autofill::AutofillProfile& profile,
|
| + const std::string& app_locale);
|
| +
|
| +// Helper function to get an instance of web::BasicCardResponse from an autofill
|
| +// credit card.
|
| +web::BasicCardResponse GetBasicCardResponseFromAutofillCreditCard(
|
| + const autofill::CreditCard& card,
|
| + const base::string16& cvc,
|
| + const std::vector<autofill::AutofillProfile*>& billing_profiles,
|
| + const std::string& app_locale);
|
| +
|
| +} // namespace data_util
|
| +} // namespace payments
|
| +
|
| +#endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DATA_UTIL_H_
|
|
|