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

Unified Diff: components/autofill/content/renderer/form_cache.cc

Issue 2424793002: Revert of 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
« no previous file with comments | « no previous file | components/autofill/core/browser/address_i18n_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/form_cache.cc
diff --git a/components/autofill/content/renderer/form_cache.cc b/components/autofill/content/renderer/form_cache.cc
index 925379d1915662fc9826d81efd9a8fe3c95c42e4..0ff07229ed661ac48169382c8d6f28bc9fd18043 100644
--- a/components/autofill/content/renderer/form_cache.cc
+++ b/components/autofill/content/renderer/form_cache.cc
@@ -45,10 +45,10 @@
element.getAttribute("autocomplete")));
static const char* const deprecated[] = { "region", "locality" };
- for (const char* str : deprecated) {
- if (autocomplete_attribute.find(str) == std::string::npos)
- continue;
- std::string msg = std::string("autocomplete='") + str +
+ for (size_t i = 0; i < arraysize(deprecated); ++i) {
+ if (autocomplete_attribute.find(deprecated[i]) == std::string::npos)
+ continue;
+ std::string msg = std::string("autocomplete='") + deprecated[i] +
"' is deprecated and will soon be ignored. See http://goo.gl/YjeSsW";
WebConsoleMessage console_message = WebConsoleMessage(
WebConsoleMessage::LevelWarning,
« no previous file with comments | « no previous file | components/autofill/core/browser/address_i18n_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698