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

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

Issue 2779283002: [Web Payments] Implement the CVC Unmask dialog. (Closed)
Patch Set: Address comments 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..0e5a6169db332635e4ea0874019e405a58deb4bf 100644
--- a/components/payments/content/payment_request_state.cc
+++ b/components/payments/content/payment_request_state.cc
@@ -11,6 +11,7 @@
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/browser/personal_data_manager.h"
+#include "components/payments/content/payment_request_delegate.h"
#include "components/payments/content/payment_request_spec.h"
#include "components/payments/content/payment_response_helper.h"
#include "components/payments/core/autofill_payment_instrument.h"
@@ -21,7 +22,9 @@ PaymentRequestState::PaymentRequestState(
PaymentRequestSpec* spec,
Delegate* delegate,
const std::string& app_locale,
- autofill::PersonalDataManager* personal_data_manager)
+ autofill::PersonalDataManager* personal_data_manager,
+ AutofillPaymentInstrument::FullCardRequestDelegate*
+ full_card_request_delegate)
: is_ready_to_pay_(false),
app_locale_(app_locale),
spec_(spec),
@@ -29,7 +32,8 @@ PaymentRequestState::PaymentRequestState(
personal_data_manager_(personal_data_manager),
selected_shipping_profile_(nullptr),
selected_contact_profile_(nullptr),
- selected_instrument_(nullptr) {
+ selected_instrument_(nullptr),
+ full_card_request_delegate_(full_card_request_delegate) {
PopulateProfileCache();
SetDefaultProfileSelections();
}
@@ -183,7 +187,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_,
+ full_card_request_delegate_);
available_instruments_.push_back(std::move(instrument));
}
}

Powered by Google App Engine
This is Rietveld 408576698