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

Unified Diff: components/payments/content/payment_response_helper.h

Issue 2779813003: [Payments] Add Ship. Addr. & Contact Info in Payment Response on Desktop. (Closed)
Patch Set: Addressed comments 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/content/payment_response_helper.h
diff --git a/components/payments/content/payment_response_helper.h b/components/payments/content/payment_response_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..0912302ac5c2cfd3c0499bbb6750bae0e6b866a4
--- /dev/null
+++ b/components/payments/content/payment_response_helper.h
@@ -0,0 +1,37 @@
+// 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_CONTENT_PAYMENT_RESPONSE_HELPER_H_
+#define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_RESPONSE_HELPER_H_
+
+#include "base/macros.h"
+#include "components/payments/content/payment_request.mojom.h"
+
+namespace autofill {
+class AutofillProfile;
+} // namespace autofill
+
+namespace payments {
+
+// TODO(sebsg): Accept PaymentInstrument and handle generating the payment
+// aspect of the PaymentResponse in this class.
+// TODO(sebsg): Asynchronously normalize the billing and shipping addresses
+// before adding them to the PaymentResponse.
+// A helper class to facilitate the creation of the PaymentResponse.
+class PaymentResponseHelper {
+ public:
+ PaymentResponseHelper();
+ ~PaymentResponseHelper();
+
+ static mojom::PaymentAddressPtr GetMojomPaymentAddressFromAutofillProfile(
+ const autofill::AutofillProfile* const profile,
+ const std::string& app_locale);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PaymentResponseHelper);
+};
+
+} // namespace payments
+
+#endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_RESPONSE_HELPER_H_
« no previous file with comments | « components/payments/content/payment_request_state_unittest.cc ('k') | components/payments/content/payment_response_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698