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

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

Issue 2478463002: Reland of place for loops with |arraysize| with for each loops (Closed)
Patch Set: Created 4 years, 1 month 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_profile.cc
diff --git a/components/autofill/core/browser/autofill_profile.cc b/components/autofill/core/browser/autofill_profile.cc
index 602cf1bf7bb2e320f732ade1783149cd70ace8c7..469111e4ce6e0a8a6d44aaed45dbd16c956e257f 100644
--- a/components/autofill/core/browser/autofill_profile.cc
+++ b/components/autofill/core/browser/autofill_profile.cc
@@ -354,8 +354,8 @@
PHONE_HOME_WHOLE_NUMBER,
};
- for (size_t i = 0; i < arraysize(types); ++i) {
- int comparison = GetRawInfo(types[i]).compare(profile.GetRawInfo(types[i]));
+ for (ServerFieldType type : types) {
+ int comparison = GetRawInfo(type).compare(profile.GetRawInfo(type));
if (comparison != 0) {
return comparison;
}
« no previous file with comments | « components/autofill/core/browser/autofill_merge_unittest.cc ('k') | components/autofill/core/browser/contact_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698