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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/prefs/pref_change_registrar.h" | |
10 #include "base/prefs/pref_service.h" | |
11 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
12 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 10 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
13 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 11 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
14 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 12 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
15 #include "chrome/browser/chromeos/settings/cros_settings.h" | 13 #include "chrome/browser/chromeos/settings/cros_settings.h" |
16 #include "chrome/browser/chromeos/system/system_clock_observer.h" | 14 #include "chrome/browser/chromeos/system/system_clock_observer.h" |
17 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/profiles/profile_manager.h" | 16 #include "chrome/browser/profiles/profile_manager.h" |
19 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
20 #include "chromeos/login/login_state.h" | 18 #include "chromeos/login/login_state.h" |
21 #include "chromeos/settings/cros_settings_names.h" | 19 #include "chromeos/settings/cros_settings_names.h" |
| 20 #include "components/prefs/pref_change_registrar.h" |
| 21 #include "components/prefs/pref_service.h" |
22 #include "components/user_manager/user.h" | 22 #include "components/user_manager/user.h" |
23 #include "components/user_manager/user_manager.h" | 23 #include "components/user_manager/user_manager.h" |
24 #include "content/public/browser/notification_service.h" | 24 #include "content/public/browser/notification_service.h" |
25 | 25 |
26 namespace chromeos { | 26 namespace chromeos { |
27 namespace system { | 27 namespace system { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 void SetShouldUse24HourClock(bool use_24_hour_clock) { | 31 void SetShouldUse24HourClock(bool use_24_hour_clock) { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // This also works for enterprise-managed devices because they never have | 210 // This also works for enterprise-managed devices because they never have |
211 // a local owner. | 211 // a local owner. |
212 if (user_manager::UserManager::Get()->IsCurrentUserOwner()) | 212 if (user_manager::UserManager::Get()->IsCurrentUserOwner()) |
213 SetShouldUse24HourClock(ShouldUse24HourClock()); | 213 SetShouldUse24HourClock(ShouldUse24HourClock()); |
214 FOR_EACH_OBSERVER(SystemClockObserver, observer_list_, | 214 FOR_EACH_OBSERVER(SystemClockObserver, observer_list_, |
215 OnSystemClockChanged(this)); | 215 OnSystemClockChanged(this)); |
216 } | 216 } |
217 | 217 |
218 } // namespace system | 218 } // namespace system |
219 } // namespace chromeos | 219 } // namespace chromeos |
OLD | NEW |