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

Side by Side Diff: chrome/browser/chromeos/system/system_clock.cc

Issue 2416763002: Replace FOR_EACH_OBSERVER in c/b/chromeos with range-based for (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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/system/pointer_device_observer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromeos/system/system_clock.h" 5 #include "chrome/browser/chromeos/system/system_clock.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 void SystemClock::OnSystemPrefChanged() { 206 void SystemClock::OnSystemPrefChanged() {
207 UpdateClockType(); 207 UpdateClockType();
208 } 208 }
209 209
210 void SystemClock::UpdateClockType() { 210 void SystemClock::UpdateClockType() {
211 // This also works for enterprise-managed devices because they never have 211 // This also works for enterprise-managed devices because they never have
212 // a local owner. 212 // a local owner.
213 if (user_manager::UserManager::Get()->IsCurrentUserOwner()) 213 if (user_manager::UserManager::Get()->IsCurrentUserOwner())
214 SetShouldUse24HourClock(ShouldUse24HourClock()); 214 SetShouldUse24HourClock(ShouldUse24HourClock());
215 FOR_EACH_OBSERVER(SystemClockObserver, observer_list_, 215 for (auto& observer : observer_list_)
216 OnSystemClockChanged(this)); 216 observer.OnSystemClockChanged(this);
217 } 217 }
218 218
219 } // namespace system 219 } // namespace system
220 } // namespace chromeos 220 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system/pointer_device_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698