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

Unified Diff: chrome/browser/ui/autofill/data_model_wrapper.h

Issue 14425010: Handle expired Autofill credit cards in autofill dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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: chrome/browser/ui/autofill/data_model_wrapper.h
diff --git a/chrome/browser/ui/autofill/data_model_wrapper.h b/chrome/browser/ui/autofill/data_model_wrapper.h
index 4e6c486bea00e8c3332193926383c73472c72a6a..b5d1b29ac95518be6ec36a601390d3df4b91f915 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper.h
+++ b/chrome/browser/ui/autofill/data_model_wrapper.h
@@ -56,6 +56,9 @@ class DataModelWrapper {
const InputFieldComparator& compare,
FormStructure* form_structure);
+ // Whether the wrapper has valid data (e.g. whether a credit card is expired).
+ virtual bool IsValid() const = 0;
Evan Stade 2013/04/24 22:00:17 no need to make this pure virtual why add this in
Dan Beam 2013/04/26 02:11:32 Done.
+
protected:
DataModelWrapper();
@@ -93,6 +96,7 @@ class AutofillProfileWrapper : public AutofillDataModelWrapper {
virtual ~AutofillProfileWrapper();
virtual void FillInputs(DetailInputs* inputs) OVERRIDE;
+ virtual bool IsValid() const OVERRIDE;
private:
const AutofillProfile* profile_;
@@ -109,6 +113,7 @@ class AutofillCreditCardWrapper : public AutofillDataModelWrapper {
virtual string16 GetInfo(AutofillFieldType type) OVERRIDE;
virtual gfx::Image GetIcon() OVERRIDE;
virtual string16 GetDisplayText() OVERRIDE;
+ virtual bool IsValid() const OVERRIDE;
protected:
virtual void FillFormField(AutofillField* field) OVERRIDE;
@@ -126,6 +131,7 @@ class WalletAddressWrapper : public DataModelWrapper {
virtual ~WalletAddressWrapper();
virtual string16 GetInfo(AutofillFieldType type) OVERRIDE;
+ virtual bool IsValid() const OVERRIDE;
private:
const wallet::Address* address_;
@@ -143,6 +149,7 @@ class WalletInstrumentWrapper : public DataModelWrapper {
virtual string16 GetInfo(AutofillFieldType type) OVERRIDE;
virtual gfx::Image GetIcon() OVERRIDE;
virtual string16 GetDisplayText() OVERRIDE;
+ virtual bool IsValid() const OVERRIDE;
private:
const wallet::WalletItems::MaskedInstrument* instrument_;
@@ -157,6 +164,7 @@ class FullWalletBillingWrapper : public DataModelWrapper {
virtual ~FullWalletBillingWrapper();
virtual string16 GetInfo(AutofillFieldType type) OVERRIDE;
+ virtual bool IsValid() const OVERRIDE;
private:
wallet::FullWallet* full_wallet_;
@@ -171,6 +179,7 @@ class FullWalletShippingWrapper : public DataModelWrapper {
virtual ~FullWalletShippingWrapper();
virtual string16 GetInfo(AutofillFieldType type) OVERRIDE;
+ virtual bool IsValid() const OVERRIDE;
private:
wallet::FullWallet* full_wallet_;

Powered by Google App Engine
This is Rietveld 408576698