OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromeos/timezone/timezone_resolver.h" | 5 #include "chromeos/timezone/timezone_resolver.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback_helpers.h" | 13 #include "base/callback_helpers.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/power_monitor/power_monitor.h" | 16 #include "base/power_monitor/power_monitor.h" |
17 #include "base/power_monitor/power_observer.h" | 17 #include "base/power_monitor/power_observer.h" |
18 #include "base/prefs/pref_registry_simple.h" | |
19 #include "base/prefs/pref_service.h" | |
20 #include "base/rand_util.h" | 18 #include "base/rand_util.h" |
21 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
22 #include "base/time/time.h" | 20 #include "base/time/time.h" |
23 #include "chromeos/geolocation/geoposition.h" | 21 #include "chromeos/geolocation/geoposition.h" |
24 #include "chromeos/geolocation/simple_geolocation_provider.h" | 22 #include "chromeos/geolocation/simple_geolocation_provider.h" |
25 #include "chromeos/timezone/timezone_provider.h" | 23 #include "chromeos/timezone/timezone_provider.h" |
| 24 #include "components/prefs/pref_registry_simple.h" |
| 25 #include "components/prefs/pref_service.h" |
26 | 26 |
27 namespace chromeos { | 27 namespace chromeos { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 class TZRequest; | 31 class TZRequest; |
32 | 32 |
33 // Total timezone resolving process timeout. | 33 // Total timezone resolving process timeout. |
34 const unsigned int kRefreshTimeZoneTimeoutSeconds = 60; | 34 const unsigned int kRefreshTimeZoneTimeoutSeconds = 60; |
35 | 35 |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 int TimeZoneResolver::IntervalForNextRequestForTesting(const int requests) { | 414 int TimeZoneResolver::IntervalForNextRequestForTesting(const int requests) { |
415 return IntervalForNextRequest(requests); | 415 return IntervalForNextRequest(requests); |
416 } | 416 } |
417 | 417 |
418 // static | 418 // static |
419 void TimeZoneResolver::RegisterPrefs(PrefRegistrySimple* registry) { | 419 void TimeZoneResolver::RegisterPrefs(PrefRegistrySimple* registry) { |
420 registry->RegisterInt64Pref(kLastTimeZoneRefreshTime, 0); | 420 registry->RegisterInt64Pref(kLastTimeZoneRefreshTime, 0); |
421 } | 421 } |
422 | 422 |
423 } // namespace chromeos | 423 } // namespace chromeos |
OLD | NEW |