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

Unified Diff: chrome/browser/prefs/chrome_pref_service_factory.cc

Issue 655413002: Convert ARRAYSIZE_UNSAFE -> arraysize in chrome/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: chrome/browser/prefs/chrome_pref_service_factory.cc
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
index 4104f0e6693ba141f0a3ec40853da7d4a05af9a3..4f66ad20a140fad027eead28ee7964a27eec7814 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -252,11 +252,7 @@ SettingsEnforcementGroup GetSettingsEnforcementGroup() {
chrome_prefs::internals::kSettingsEnforcementTrialName);
if (trial) {
const std::string& group_name = trial->group_name();
- // ARRAYSIZE_UNSAFE must be used since the array is declared locally; it is
- // only unsafe because it could not trigger a compile error on some
- // non-array pointer types; this is fine since kEnforcementLevelMap is
- // clearly an array.
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kEnforcementLevelMap); ++i) {
+ for (size_t i = 0; i < arraysize(kEnforcementLevelMap); ++i) {
if (kEnforcementLevelMap[i].group_name == group_name) {
enforcement_group = kEnforcementLevelMap[i].group;
group_determined_from_trial = true;
« no previous file with comments | « chrome/browser/predictors/autocomplete_action_predictor_unittest.cc ('k') | chrome/browser/prerender/prerender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698