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

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: rebase 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
« no previous file with comments | « no previous file | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f969dbf975cc98c13f330b52c8dea1850ae3b1e1..acfb47df60fbf963abdbc98e9dfc45dc3b891fc1 100644
--- a/components/autofill/core/browser/autocomplete_history_manager.cc
+++ b/components/autofill/core/browser/autocomplete_history_manager.cc
@@ -127,16 +127,12 @@ void AutocompleteHistoryManager::OnFormSubmitted(const FormData& form) {
// - 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698