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

Side by Side Diff: components/payments/content/payment_response_helper.h

Issue 2836353002: [Payments] Normalize shipping address change on Desktop (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_RESPONSE_HELPER_H_ 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_RESPONSE_HELPER_H_
6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_RESPONSE_HELPER_H_ 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_RESPONSE_HELPER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/autofill/core/browser/autofill_profile.h" 9 #include "components/autofill/core/browser/autofill_profile.h"
10 #include "components/payments/core/address_normalizer.h" 10 #include "components/payments/core/address_normalizer.h"
(...skipping 25 matching lines...) Expand all
36 PaymentInstrument* selected_instrument, 36 PaymentInstrument* selected_instrument,
37 PaymentRequestDelegate* payment_request_delegate, 37 PaymentRequestDelegate* payment_request_delegate,
38 autofill::AutofillProfile* selected_shipping_profile, 38 autofill::AutofillProfile* selected_shipping_profile,
39 autofill::AutofillProfile* selected_contact_profile, 39 autofill::AutofillProfile* selected_contact_profile,
40 Delegate* delegate); 40 Delegate* delegate);
41 ~PaymentResponseHelper() override; 41 ~PaymentResponseHelper() override;
42 42
43 // Returns a new mojo PaymentAddress based on the specified 43 // Returns a new mojo PaymentAddress based on the specified
44 // |profile| and |app_locale|. 44 // |profile| and |app_locale|.
45 static mojom::PaymentAddressPtr GetMojomPaymentAddressFromAutofillProfile( 45 static mojom::PaymentAddressPtr GetMojomPaymentAddressFromAutofillProfile(
46 const autofill::AutofillProfile* const profile, 46 const autofill::AutofillProfile& profile,
47 const std::string& app_locale); 47 const std::string& app_locale);
48 48
49 // PaymentInstrument::Delegate 49 // PaymentInstrument::Delegate
50 void OnInstrumentDetailsReady( 50 void OnInstrumentDetailsReady(
51 const std::string& method_name, 51 const std::string& method_name,
52 const std::string& stringified_details) override; 52 const std::string& stringified_details) override;
53 void OnInstrumentDetailsError() override {} 53 void OnInstrumentDetailsError() override {}
54 54
55 // AddressNormalizer::Delegate 55 // AddressNormalizer::Delegate
56 void OnAddressNormalized( 56 void OnAddressNormalized(
(...skipping 10 matching lines...) Expand all
67 67
68 // Not owned, cannot be null. 68 // Not owned, cannot be null.
69 PaymentRequestSpec* spec_; 69 PaymentRequestSpec* spec_;
70 Delegate* delegate_; 70 Delegate* delegate_;
71 PaymentInstrument* selected_instrument_; 71 PaymentInstrument* selected_instrument_;
72 PaymentRequestDelegate* payment_request_delegate_; 72 PaymentRequestDelegate* payment_request_delegate_;
73 73
74 // Not owned, can be null (dependent on the spec). 74 // Not owned, can be null (dependent on the spec).
75 autofill::AutofillProfile* selected_contact_profile_; 75 autofill::AutofillProfile* selected_contact_profile_;
76 76
77 autofill::AutofillProfile shipping_address_; 77 autofill::AutofillProfile shipping_address_;
Mathieu 2017/04/26 13:09:49 // A copy of the shipping address, which will be n
sebsg 2017/04/26 19:28:54 Thanks, changed the comment a bit as this address
78 78
79 // Instrument Details. 79 // Instrument Details.
80 std::string method_name_; 80 std::string method_name_;
81 std::string stringified_details_; 81 std::string stringified_details_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(PaymentResponseHelper); 83 DISALLOW_COPY_AND_ASSIGN(PaymentResponseHelper);
84 }; 84 };
85 85
86 } // namespace payments 86 } // namespace payments
87 87
88 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_RESPONSE_HELPER_H_ 88 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_RESPONSE_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698