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

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

Issue 2757523002: [Payments] Use PaymentInstrument/AutofillPaymentInstrument throughout. (Closed)
Patch Set: remove instrument cache Created 3 years, 9 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 a9348d52225d405a6cb348772d98364325070a73..3ac501a23935c95e7be7e90af337e0ac14640a77 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,28 @@ 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;
+ virtual bool IsValid() = 0;
please use gerrit instead 2017/03/16 14:27:03 Add a comment.
Mathieu 2017/03/16 14:57:04 Done.
const std::string& method_name() { return method_name_; }
please use gerrit instead 2017/03/16 14:27:03 These methods should be const.
Mathieu 2017/03/16 14:57:04 Done.
+ const base::string16& label() { return label_; }
+ const base::string16& sublabel() { return sublabel_; }
+ int icon_resource_id() { return icon_resource_id_; }
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);
};

Powered by Google App Engine
This is Rietveld 408576698