Chromium Code Reviews| 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_; |