Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Unified Diff: components/payments/core/payment_request_data_util.h

Issue 2733953003: [Payments] Return a basic card response (Closed)
Patch Set: tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698