summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/credit_card.h
diff options
context:
space:
mode:
authorsreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-16 19:20:39 +0000
committersreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-16 19:20:39 +0000
commit530d72d25d1005799558b934be8b1175703762f2 (patch)
treeb120258663a926a4d8b8e5458eaf3ec78d8a4ff9 /chrome/browser/autofill/credit_card.h
parent8e3cd86e323e5574a238c117e10af73ef5bea52a (diff)
downloadchromium_src-530d72d25d1005799558b934be8b1175703762f2.zip
chromium_src-530d72d25d1005799558b934be8b1175703762f2.tar.gz
chromium_src-530d72d25d1005799558b934be8b1175703762f2.tar.bz2
Revert 168247 - more autofill refactoring
makes AutofillProfile and CreditCard better resemble one another. Much code deleted. BUG=none Review URL: https://codereview.chromium.org/11312259 TBR=estade@chromium.org Failed some Autofill related sync tests: http://build.chromium.org/p/chromium.mac/builders/Mac10.6%20Sync/builds/24913 Review URL: https://codereview.chromium.org/11413043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/credit_card.h')
-rw-r--r--chrome/browser/autofill/credit_card.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/chrome/browser/autofill/credit_card.h b/chrome/browser/autofill/credit_card.h
index 921db3a..256a511 100644
--- a/chrome/browser/autofill/credit_card.h
+++ b/chrome/browser/autofill/credit_card.h
@@ -26,18 +26,14 @@ 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 FillFormField(const AutofillField& field,
- size_t variant,
- FormFieldData* field_data) const OVERRIDE;
+ virtual void GetMatchingTypes(const string16& text,
+ FieldTypeSet* matching_types) const OVERRIDE;
// Credit card preview summary, for example: ******1234, Exp: 01/2020
const string16 Label() const;
@@ -53,8 +49,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_; }
+ const std::string guid() const { return guid_; }
void set_guid(const std::string& guid) { guid_ = guid; }
// For use in STL containers.
@@ -66,6 +61,9 @@ 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