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

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

Issue 2836353002: [Payments] Normalize shipping address change on Desktop (Closed)
Patch Set: Created 3 years, 8 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_request_state.h
diff --git a/components/payments/content/payment_request_state.h b/components/payments/content/payment_request_state.h
index 9ff914228203d2271ad19c622810816074762d54..9bf8c25b244fcb87a9fd680ef02c85b8893bb43c 100644
--- a/components/payments/content/payment_request_state.h
+++ b/components/payments/content/payment_request_state.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/observer_list.h"
#include "components/payments/content/payment_response_helper.h"
+#include "components/payments/core/address_normalizer.h"
#include "components/payments/mojom/payment_request.mojom.h"
namespace autofill {
@@ -31,7 +32,8 @@ class PaymentRequestSpec;
// user is ready to pay. Uses information from the PaymentRequestSpec, which is
// what the merchant has specified, as input into the "is ready to pay"
// computation.
-class PaymentRequestState : public PaymentResponseHelper::Delegate {
+class PaymentRequestState : public PaymentResponseHelper::Delegate,
+ public AddressNormalizer::Delegate {
public:
// Any class call add itself as Observer via AddObserver() and receive
// notification about the state changing.
@@ -73,6 +75,11 @@ class PaymentRequestState : public PaymentResponseHelper::Delegate {
void OnPaymentResponseReady(
mojom::PaymentResponsePtr payment_response) override;
+ // AddressNormalizer::Delegate
+ void OnAddressNormalized(
+ const autofill::AutofillProfile& normalized_profile) override;
+ void OnCouldNotNormalize(const autofill::AutofillProfile& profile) override;
+
// Returns whether the user has at least one instrument that satisfies the
// specified supported payment methods.
bool CanMakePayment() const;

Powered by Google App Engine
This is Rietveld 408576698