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

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

Issue 2733953003: [Payments] Return a basic card response (Closed)
Patch Set: addressed comments from anthony 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..5ad8e190e2284b55e8613163957c0bb77e01d6ca
--- /dev/null
+++ b/components/payments/core/payment_request_data_util.h
@@ -0,0 +1,42 @@
+// 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 payments {
+
+struct BasicCardResponse;
+struct PaymentAddress;
+
+namespace data_util {
+
+// Helper function to get an instance of web::PaymentAddress from an autofill
+// profile.
+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.
+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_
« no previous file with comments | « components/payments/core/payment_instrument.h ('k') | components/payments/core/payment_request_data_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698