diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 19:26:05 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 19:26:05 +0000 |
commit | d7da65dcddcfcf6c63cecdbedccdd6fd1cbf07d2 (patch) | |
tree | a60df142f8575775ea73bee896f6645363fd7472 /chrome/browser/autofill/form_group.cc | |
parent | f920f91f55cb5d549b5048716326ab21914bdff6 (diff) | |
download | chromium_src-d7da65dcddcfcf6c63cecdbedccdd6fd1cbf07d2.zip chromium_src-d7da65dcddcfcf6c63cecdbedccdd6fd1cbf07d2.tar.gz chromium_src-d7da65dcddcfcf6c63cecdbedccdd6fd1cbf07d2.tar.bz2 |
Autofill form submission creates wrong credit cards.
Adds logic to filter out credit card submissions that are invalid, or to merge credit cards that match the card number.
BUG=57975
TEST=PersonalDataManagerTest.Aggregate*
Review URL: http://codereview.chromium.org/4734001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65830 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/form_group.cc')
-rw-r--r-- | chrome/browser/autofill/form_group.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/autofill/form_group.cc b/chrome/browser/autofill/form_group.cc index 7e91bc3..49beb16 100644 --- a/chrome/browser/autofill/form_group.cc +++ b/chrome/browser/autofill/form_group.cc @@ -76,3 +76,13 @@ void FormGroup::MergeWith(const FormGroup& form_group) { SetInfo(type, form_group.GetFieldText(type)); } } + +void FormGroup::OverwriteWith(const FormGroup& form_group) { + FieldTypeSet a;; + form_group.GetAvailableFieldTypes(&a); + + for (FieldTypeSet::const_iterator iter = a.begin(); iter != a.end(); ++iter) { + AutoFillType type(*iter); + SetInfo(type, form_group.GetFieldText(type)); + } +} |