Chromium Code Reviews| Index: components/payments/core/payment_instrument.h |
| diff --git a/components/payments/core/payment_instrument.h b/components/payments/core/payment_instrument.h |
| index a9348d52225d405a6cb348772d98364325070a73..c3bc5091da0ee56985a576eb3fdfe3f93cd594b8 100644 |
| --- a/components/payments/core/payment_instrument.h |
| +++ b/components/payments/core/payment_instrument.h |
| @@ -9,6 +9,7 @@ |
| #include <string> |
| #include "base/macros.h" |
| +#include "base/strings/string16.h" |
| namespace payments { |
| @@ -28,19 +29,29 @@ class PaymentInstrument { |
| virtual void OnInstrumentDetailsError() = 0; |
| }; |
| - virtual ~PaymentInstrument() {} |
| + virtual ~PaymentInstrument(); |
| // Will call into the |delegate| (can't be null) on success or error. |
| virtual void InvokePaymentApp(Delegate* delegate) = 0; |
| + // Returns if the card is valid to be used as a payment method. |
|
please use gerrit instead
2017/03/16 15:01:24
Add "true" after "Returns". (Or replace "if" with
|
| + virtual bool IsValid() = 0; |
| - const std::string& method_name() { return method_name_; } |
| + const std::string& method_name() const { return method_name_; } |
| + const base::string16& label() const { return label_; } |
| + const base::string16& sublabel() const { return sublabel_; } |
| + int icon_resource_id() { return icon_resource_id_; } |
|
please use gerrit instead
2017/03/16 15:01:24
const this method as well, please.
|
| protected: |
| - explicit PaymentInstrument(const std::string& method_name) |
| - : method_name_(method_name) {} |
| + PaymentInstrument(const std::string& method_name, |
| + const base::string16& label, |
| + const base::string16& sublabel, |
| + int icon_resource_id); |
| private: |
| const std::string method_name_; |
| + const base::string16 label_; |
| + const base::string16 sublabel_; |
| + int icon_resource_id_; |
| DISALLOW_COPY_AND_ASSIGN(PaymentInstrument); |
| }; |