diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-16 22:10:39 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-16 22:10:39 +0000 |
commit | 8da04b85b1e9c88d636175c01c218adf6dc4b768 (patch) | |
tree | 2ba197d18ba61861da39e2a03dd3a5df8efd9c42 /chrome/browser/autofill/credit_card.h | |
parent | 97525370580abfdde511db31db159aa064b2cbda (diff) | |
download | chromium_src-8da04b85b1e9c88d636175c01c218adf6dc4b768.zip chromium_src-8da04b85b1e9c88d636175c01c218adf6dc4b768.tar.gz chromium_src-8da04b85b1e9c88d636175c01c218adf6dc4b768.tar.bz2 |
retry r168247: more autofill refactoring
makes AutofillProfile and CreditCard better resemble one another. Much code deleted.
BUG=none
fix: revert change to guid() that made it return a reference.
Review URL: https://codereview.chromium.org/11299046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168304 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/credit_card.h')
-rw-r--r-- | chrome/browser/autofill/credit_card.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/autofill/credit_card.h b/chrome/browser/autofill/credit_card.h index 256a511..714a4c5 100644 --- a/chrome/browser/autofill/credit_card.h +++ b/chrome/browser/autofill/credit_card.h @@ -26,14 +26,18 @@ class CreditCard : public FormGroup { virtual ~CreditCard(); // FormGroup implementation: + virtual std::string GetGUID() const OVERRIDE; + virtual void GetMatchingTypes(const string16& text, + FieldTypeSet* matching_types) const OVERRIDE; virtual string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; virtual void SetRawInfo(AutofillFieldType type, const string16& value) OVERRIDE; virtual string16 GetCanonicalizedInfo(AutofillFieldType type) const OVERRIDE; virtual bool SetCanonicalizedInfo(AutofillFieldType type, const string16& value) OVERRIDE; - virtual void GetMatchingTypes(const string16& text, - FieldTypeSet* matching_types) const OVERRIDE; + virtual void FillFormField(const AutofillField& field, + size_t variant, + FormFieldData* field_data) const OVERRIDE; // Credit card preview summary, for example: ******1234, Exp: 01/2020 const string16 Label() const; @@ -49,6 +53,7 @@ class CreditCard : public FormGroup { const std::string& type() const { return type_; } // The guid is the primary identifier for |CreditCard| objects. + // TODO(estade): remove this and just use GetGUID(). const std::string guid() const { return guid_; } void set_guid(const std::string& guid) { guid_ = guid; } @@ -61,9 +66,6 @@ class CreditCard : public FormGroup { bool UpdateFromImportedCard(const CreditCard& imported_card) WARN_UNUSED_RESULT; - // Set |field|'s value based on |type| and contents of |this|. - void FillFormField(AutofillFieldType type, FormFieldData* field) const; - // Comparison for Sync. Returns 0 if the credit card is the same as |this|, // or < 0, or > 0 if it is different. The implied ordering can be used for // culling duplicates. The ordering is based on collation order of the |