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

Side by Side Diff: chrome/browser/profile_resetter/profile_resetter.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profile_resetter/profile_resetter.h" 5 #include "chrome/browser/profile_resetter/profile_resetter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/prefs/scoped_user_pref_update.h" 10 #include "base/prefs/scoped_user_pref_update.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 {HOMEPAGE, &ProfileResetter::ResetHomepage}, 110 {HOMEPAGE, &ProfileResetter::ResetHomepage},
111 {CONTENT_SETTINGS, &ProfileResetter::ResetContentSettings}, 111 {CONTENT_SETTINGS, &ProfileResetter::ResetContentSettings},
112 {COOKIES_AND_SITE_DATA, &ProfileResetter::ResetCookiesAndSiteData}, 112 {COOKIES_AND_SITE_DATA, &ProfileResetter::ResetCookiesAndSiteData},
113 {EXTENSIONS, &ProfileResetter::ResetExtensions}, 113 {EXTENSIONS, &ProfileResetter::ResetExtensions},
114 {STARTUP_PAGES, &ProfileResetter::ResetStartupPages}, 114 {STARTUP_PAGES, &ProfileResetter::ResetStartupPages},
115 {PINNED_TABS, &ProfileResetter::ResetPinnedTabs}, 115 {PINNED_TABS, &ProfileResetter::ResetPinnedTabs},
116 {SHORTCUTS, &ProfileResetter::ResetShortcuts}, 116 {SHORTCUTS, &ProfileResetter::ResetShortcuts},
117 }; 117 };
118 118
119 ResettableFlags reset_triggered_for_flags = 0; 119 ResettableFlags reset_triggered_for_flags = 0;
120 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(flagToMethod); ++i) { 120 for (size_t i = 0; i < arraysize(flagToMethod); ++i) {
121 if (resettable_flags & flagToMethod[i].flag) { 121 if (resettable_flags & flagToMethod[i].flag) {
122 reset_triggered_for_flags |= flagToMethod[i].flag; 122 reset_triggered_for_flags |= flagToMethod[i].flag;
123 (this->*flagToMethod[i].method)(); 123 (this->*flagToMethod[i].method)();
124 } 124 }
125 } 125 }
126 126
127 DCHECK_EQ(resettable_flags, reset_triggered_for_flags); 127 DCHECK_EQ(resettable_flags, reset_triggered_for_flags);
128 } 128 }
129 129
130 bool ProfileResetter::IsActive() const { 130 bool ProfileResetter::IsActive() const {
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 chrome_exe, 348 chrome_exe,
349 false, 349 false,
350 cancel, 350 cancel,
351 &shortcuts); 351 &shortcuts);
352 } 352 }
353 return shortcuts; 353 return shortcuts;
354 #else 354 #else
355 return std::vector<ShortcutCommand>(); 355 return std::vector<ShortcutCommand>();
356 #endif 356 #endif
357 } 357 }
OLDNEW
« no previous file with comments | « chrome/browser/profile_resetter/jtl_interpreter_unittest.cc ('k') | chrome/browser/profiles/profile_info_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698