OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_NET_NETWORK_TIME_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_NET_NETWORK_TIME_TRACKER_H_ |
6 #define CHROME_BROWSER_NET_NETWORK_TIME_TRACKER_H_ | 6 #define CHROME_BROWSER_NET_NETWORK_TIME_TRACKER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
11 #include "base/time.h" | 11 #include "base/time/time.h" |
12 #include "net/base/network_time_notifier.h" | 12 #include "net/base/network_time_notifier.h" |
13 | 13 |
14 class IOThread; | 14 class IOThread; |
15 class NetworkTimeTrackerTest; | 15 class NetworkTimeTrackerTest; |
16 | 16 |
17 // A class that receives network time updates and can provide the network time | 17 // A class that receives network time updates and can provide the network time |
18 // for a corresponding local time. This class is not thread safe, but may live | 18 // for a corresponding local time. This class is not thread safe, but may live |
19 // on any thread. | 19 // on any thread. |
20 // Note that all NetworkTimeTracker instances interact with a | 20 // Note that all NetworkTimeTracker instances interact with a |
21 // NetworkTimeNotifier singleton that lives on the IO thread. This class | 21 // NetworkTimeNotifier singleton that lives on the IO thread. This class |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 base::TimeDelta network_time_uncertainty_; | 75 base::TimeDelta network_time_uncertainty_; |
76 | 76 |
77 base::WeakPtrFactory<NetworkTimeTracker> weak_ptr_factory_; | 77 base::WeakPtrFactory<NetworkTimeTracker> weak_ptr_factory_; |
78 | 78 |
79 base::ThreadChecker thread_checker_; | 79 base::ThreadChecker thread_checker_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker); | 81 DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker); |
82 }; | 82 }; |
83 | 83 |
84 #endif // CHROME_BROWSER_NET_NETWORK_TIME_TRACKER_H_ | 84 #endif // CHROME_BROWSER_NET_NETWORK_TIME_TRACKER_H_ |
OLD | NEW |