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

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

Issue 2779283002: [Web Payments] Implement the CVC Unmask dialog. (Closed)
Patch Set: BUILD 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.cc
diff --git a/components/payments/content/payment_request_state.cc b/components/payments/content/payment_request_state.cc
index c2d0960bb798f20121997d628419c9202c6b8073..0a1a487b5aaf6c6f85399733044507f0f384f124 100644
--- a/components/payments/content/payment_request_state.cc
+++ b/components/payments/content/payment_request_state.cc
@@ -14,6 +14,7 @@
#include "components/payments/content/payment_request_spec.h"
#include "components/payments/content/payment_response_helper.h"
#include "components/payments/core/autofill_payment_instrument.h"
+#include "components/payments/core/payment_request_delegate.h"
namespace payments {
@@ -21,7 +22,8 @@ PaymentRequestState::PaymentRequestState(
PaymentRequestSpec* spec,
Delegate* delegate,
const std::string& app_locale,
- autofill::PersonalDataManager* personal_data_manager)
+ autofill::PersonalDataManager* personal_data_manager,
+ PaymentRequestDelegate* payment_request_delegate)
: is_ready_to_pay_(false),
app_locale_(app_locale),
spec_(spec),
@@ -29,7 +31,8 @@ PaymentRequestState::PaymentRequestState(
personal_data_manager_(personal_data_manager),
selected_shipping_profile_(nullptr),
selected_contact_profile_(nullptr),
- selected_instrument_(nullptr) {
+ selected_instrument_(nullptr),
+ payment_request_delegate_(payment_request_delegate) {
PopulateProfileCache();
SetDefaultProfileSelections();
}
@@ -183,7 +186,8 @@ void PaymentRequestState::PopulateProfileCache() {
// indirectly owned by this object.
std::unique_ptr<PaymentInstrument> instrument =
base::MakeUnique<AutofillPaymentInstrument>(
- basic_card_network, *card, shipping_profiles_, app_locale_);
+ basic_card_network, *card, shipping_profiles_, app_locale_,
+ payment_request_delegate_);
available_instruments_.push_back(std::move(instrument));
}
}
« no previous file with comments | « components/payments/content/payment_request_state.h ('k') | components/payments/content/payment_request_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698