| Index: components/autofill/core/browser/autocomplete_history_manager.cc
|
| diff --git a/components/autofill/core/browser/autocomplete_history_manager.cc b/components/autofill/core/browser/autocomplete_history_manager.cc
|
| index 79d75b8c18d257b686c4121a9dbc5f7dedc8772a..acfb47df60fbf963abdbc98e9dfc45dc3b891fc1 100644
|
| --- a/components/autofill/core/browser/autocomplete_history_manager.cc
|
| +++ b/components/autofill/core/browser/autocomplete_history_manager.cc
|
| @@ -124,17 +124,15 @@ void AutocompleteHistoryManager::OnFormSubmitted(const FormData& form) {
|
| // - autocomplete is not disabled
|
| // - value is not a credit card number
|
| // - value is not a SSN
|
| + // - field was not identified as a CVC field (this is handled in
|
| + // AutofillManager)
|
| std::vector<FormFieldData> values;
|
| - for (std::vector<FormFieldData>::const_iterator iter =
|
| - form.fields.begin();
|
| - iter != form.fields.end(); ++iter) {
|
| - if (!iter->value.empty() &&
|
| - !iter->name.empty() &&
|
| - IsTextField(*iter) &&
|
| - iter->should_autocomplete &&
|
| - !autofill::IsValidCreditCardNumber(iter->value) &&
|
| - !autofill::IsSSN(iter->value)) {
|
| - values.push_back(*iter);
|
| + for (const FormFieldData& field : form.fields) {
|
| + if (!field.value.empty() && !field.name.empty() && IsTextField(field) &&
|
| + field.should_autocomplete &&
|
| + !autofill::IsValidCreditCardNumber(field.value) &&
|
| + !autofill::IsSSN(field.value)) {
|
| + values.push_back(field);
|
| }
|
| }
|
|
|
|
|