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

Unified Diff: components/payments/core/payment_instrument.h

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/core/payment_instrument.h
diff --git a/components/payments/core/payment_instrument.h b/components/payments/core/payment_instrument.h
index 5d70847f4f273358ce06978c94fb60caf22e148d..818077ccf6cfcdd09c0d3fd2c097650d50f0e60b 100644
--- a/components/payments/core/payment_instrument.h
+++ b/components/payments/core/payment_instrument.h
@@ -37,8 +37,10 @@ class PaymentInstrument {
// Will call into the |delegate| (can't be null) on success or error.
virtual void InvokePaymentApp(Delegate* delegate) = 0;
// Returns whether the instrument is complete to be used as a payment method
- // without further editing.
- virtual bool IsCompleteForPayment() = 0;
+ // without further editing. If it's not complete, returns false and fills
+ // |missing_info| with the message. NOTE: callers who do not care about the
+ // missing info message can pass nullptr.
+ virtual bool IsCompleteForPayment(base::string16* missing_info) = 0;
// Returns whether the instrument is valid for the purposes of responding to
// canMakePayment.
virtual bool IsValidForCanMakePayment() = 0;

Powered by Google App Engine
This is Rietveld 408576698