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

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

Issue 2417783004: Replace for loops with |arraysize| with for each loops (Closed)
Patch Set: Created 4 years, 2 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/autofill_ie_toolbar_import_win.cc
diff --git a/components/autofill/core/browser/autofill_ie_toolbar_import_win.cc b/components/autofill/core/browser/autofill_ie_toolbar_import_win.cc
index 508dfa05165df436a82fb71f258ce7e5bc999b63..15ad63088d697d82c513bf09ac905de00cde5958 100644
--- a/components/autofill/core/browser/autofill_ie_toolbar_import_win.cc
+++ b/components/autofill/core/browser/autofill_ie_toolbar_import_win.cc
@@ -246,9 +246,9 @@ bool ImportCurrentUserProfiles(const std::string& app_locale,
// Create a map of possible fields for a quick access.
RegToFieldMap reg_to_field;
- for (size_t i = 0; i < arraysize(profile_reg_values); ++i) {
- reg_to_field[std::wstring(profile_reg_values[i].reg_value_name)] =
- profile_reg_values[i].field_type;
+ for (const auto& profile_reg_value : profile_reg_values) {
+ reg_to_field[std::wstring(profile_reg_value.reg_value_name)] =
+ profile_reg_value.field_type;
}
base::win::RegistryKeyIterator iterator_profiles(HKEY_CURRENT_USER,

Powered by Google App Engine
This is Rietveld 408576698