Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: components/autofill/core/browser/autocomplete_history_manager.cc

Issue 1104543006: Style cleanups in Autofill for greater code clarity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
}
« no previous file with comments | « no previous file | components/autofill/core/browser/credit_card.cc » ('j') | components/autofill/core/browser/form_structure.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698