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

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

Issue 2813203004: [Payments] Show what's missing for incomplete payment methods. (Closed)
Patch Set: Initial 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 959ee9415f0fe604f25554f29c4a7d7119cc7fed..47f8e0c0e3e1d136a814c2383952d566c615d64e 100644
--- a/components/payments/content/payment_request_state.cc
+++ b/components/payments/content/payment_request_state.cc
@@ -179,11 +179,11 @@ void PaymentRequestState::SetDefaultProfileSelections() {
// value.
const std::vector<std::unique_ptr<PaymentInstrument>>& instruments =
available_instruments();
- auto first_complete_instrument =
- std::find_if(instruments.begin(), instruments.end(),
- [](const std::unique_ptr<PaymentInstrument>& instrument) {
- return instrument->IsCompleteForPayment();
- });
+ auto first_complete_instrument = std::find_if(
+ instruments.begin(), instruments.end(),
+ [](const std::unique_ptr<PaymentInstrument>& instrument) {
+ return instrument->IsCompleteForPayment(/*missing_info=*/nullptr);
+ });
selected_instrument_ = first_complete_instrument == instruments.end()
? nullptr
@@ -207,7 +207,7 @@ bool PaymentRequestState::ArePaymentDetailsSatisfied() {
// There is no need to check for supported networks, because only supported
// instruments are listed/created in the flow.
return selected_instrument_ != nullptr &&
- selected_instrument_->IsCompleteForPayment();
+ selected_instrument_->IsCompleteForPayment(/*missing_info=*/nullptr);
}
bool PaymentRequestState::ArePaymentOptionsSatisfied() {

Powered by Google App Engine
This is Rietveld 408576698