Index: chrome/browser/network_time/network_time_tracker.h |
diff --git a/chrome/browser/network_time/network_time_tracker.h b/chrome/browser/network_time/network_time_tracker.h |
index caed3fc78f8658562f2b02dff035721eff357f11..4c670d36bffba6e1b1547d98b463697e1a347dba 100644 |
--- a/chrome/browser/network_time/network_time_tracker.h |
+++ b/chrome/browser/network_time/network_time_tracker.h |
@@ -9,6 +9,9 @@ |
#include "base/threading/thread_checker.h" |
#include "base/time/time.h" |
+class PrefRegistrySimple; |
+class PrefService; |
+ |
namespace base { |
class TickClock; |
} |
@@ -17,18 +20,11 @@ class TickClock; |
// for a corresponding local time. This class is not thread safe. |
class NetworkTimeTracker { |
public: |
- explicit NetworkTimeTracker(scoped_ptr<base::TickClock> tick_clock); |
- ~NetworkTimeTracker(); |
- |
- struct TimeMapping { |
- TimeMapping(base::Time local_time, base::Time network_time); |
- base::Time local_time; |
- base::Time network_time; |
- }; |
+ static void RegisterPrefs(PrefRegistrySimple* registry); |
- // Initializes from saved times to be able to compute network time before |
- // receiving accurate time from HTTP response. |
- void InitFromSavedTime(const TimeMapping& saved); |
+ NetworkTimeTracker(scoped_ptr<base::TickClock> tick_clock, |
+ PrefService* pref_service); |
+ ~NetworkTimeTracker(); |
// Returns the network time corresponding to |time_ticks| if network time |
// is available. Returns false if no network time is available yet. Can also |
@@ -54,6 +50,8 @@ class NetworkTimeTracker { |
// For querying current time ticks. |
scoped_ptr<base::TickClock> tick_clock_; |
+ PrefService* pref_service_; |
+ |
// Network time based on last call to UpdateNetworkTime(). |
base::Time network_time_; |