| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |