OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_TIMEZONE_RESOLVER_MANAGER_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_TIMEZONE_RESOLVER_MANAGER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "chromeos/timezone/timezone_resolver.h" | |
10 #include "components/prefs/pref_change_registrar.h" | |
11 | |
12 class PrefService; | |
13 | |
14 namespace chromeos { | |
15 namespace system { | |
16 | |
17 class TimeZoneResolverManager : public TimeZoneResolver::Delegate { | |
18 public: | |
19 TimeZoneResolverManager(); | |
20 ~TimeZoneResolverManager() override; | |
21 | |
22 // This sets primary_user_prefs_. | |
23 void SetPrimaryUserPrefs(PrefService* pref_service); | |
24 | |
25 // TimeZoneResolver::Delegate overrides: | |
26 bool ShouldSendWiFiGeolocationData() override; | |
27 | |
28 // Starts or stops TimezoneResolver if according to currect settings. | |
stevenjb
2016/03/28 23:23:17
s/if//
Alexander Alekseev
2016/03/29 00:29:25
Done.
| |
29 void UpdateTimezoneResolver(); | |
30 | |
31 // Returns true if result of timezone resolve should be applied to | |
32 // system timezone (preferences might have changed since request was started). | |
33 bool IfShouldApplyResolvedTimezone(); | |
stevenjb
2016/03/28 23:23:17
Just ShouldApplyResolvedTimezone()
Alexander Alekseev
2016/03/29 00:29:25
Done.
| |
34 | |
35 private: | |
36 // Returns truw if TimeZoneResolver should be running taking in account | |
stevenjb
2016/03/28 23:23:17
s/truw/true/
s/running taking in/running and takin
Alexander Alekseev
2016/03/29 00:29:25
Done.
| |
37 // all configuration data. | |
38 bool IsTimeZoneResolverShouldBeRunnig(); | |
39 | |
40 // This is non-null only after user logs in. | |
41 PrefService* primary_user_prefs_; | |
42 | |
43 // This is used to subscribe to policy preference. | |
44 PrefChangeRegistrar local_state_pref_change_registrar_; | |
45 | |
46 DISALLOW_COPY_AND_ASSIGN(TimeZoneResolverManager); | |
47 }; | |
48 | |
49 } // namespace system | |
50 } // namespace chromeos | |
51 | |
52 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_TIMEZONE_RESOLVER_MANAGER_H_ | |
OLD | NEW |