Index: chrome/browser/chromeos/system/timezone_resolver_manager.h |
diff --git a/chrome/browser/chromeos/system/timezone_resolver_manager.h b/chrome/browser/chromeos/system/timezone_resolver_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..05c7c730eed4645f04da90cc485c08338cf5c15f |
--- /dev/null |
+++ b/chrome/browser/chromeos/system/timezone_resolver_manager.h |
@@ -0,0 +1,52 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_TIMEZONE_RESOLVER_MANAGER_H_ |
+#define CHROME_BROWSER_CHROMEOS_SYSTEM_TIMEZONE_RESOLVER_MANAGER_H_ |
+ |
+#include "base/macros.h" |
+#include "chromeos/timezone/timezone_resolver.h" |
+#include "components/prefs/pref_change_registrar.h" |
+ |
+class PrefService; |
+ |
+namespace chromeos { |
+namespace system { |
+ |
+class TimeZoneResolverManager : public TimeZoneResolver::Delegate { |
+ public: |
+ TimeZoneResolverManager(); |
+ ~TimeZoneResolverManager() override; |
+ |
+ // This sets primary_user_prefs_. |
+ void SetPrimaryUserPrefs(PrefService* pref_service); |
+ |
+ // TimeZoneResolver::Delegate overrides: |
+ bool ShouldSendWiFiGeolocationData() override; |
+ |
+ // 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.
|
+ void UpdateTimezoneResolver(); |
+ |
+ // Returns true if result of timezone resolve should be applied to |
+ // system timezone (preferences might have changed since request was started). |
+ bool IfShouldApplyResolvedTimezone(); |
stevenjb
2016/03/28 23:23:17
Just ShouldApplyResolvedTimezone()
Alexander Alekseev
2016/03/29 00:29:25
Done.
|
+ |
+ private: |
+ // 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.
|
+ // all configuration data. |
+ bool IsTimeZoneResolverShouldBeRunnig(); |
+ |
+ // This is non-null only after user logs in. |
+ PrefService* primary_user_prefs_; |
+ |
+ // This is used to subscribe to policy preference. |
+ PrefChangeRegistrar local_state_pref_change_registrar_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TimeZoneResolverManager); |
+}; |
+ |
+} // namespace system |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_SYSTEM_TIMEZONE_RESOLVER_MANAGER_H_ |