| 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 #ifndef COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ | 5 #ifndef COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ |
| 6 #define COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ | 6 #define COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 base::TimeTicks ticks_at_last_measurement_; | 210 base::TimeTicks ticks_at_last_measurement_; |
| 211 | 211 |
| 212 // Uncertainty of |network_time_| based on added inaccuracies/resolution. See | 212 // Uncertainty of |network_time_| based on added inaccuracies/resolution. See |
| 213 // UpdateNetworkTime(...) implementation for details. | 213 // UpdateNetworkTime(...) implementation for details. |
| 214 base::TimeDelta network_time_uncertainty_; | 214 base::TimeDelta network_time_uncertainty_; |
| 215 | 215 |
| 216 // True if any time query has completed (but not necessarily succeeded) in | 216 // True if any time query has completed (but not necessarily succeeded) in |
| 217 // this NetworkTimeTracker's lifetime. | 217 // this NetworkTimeTracker's lifetime. |
| 218 bool time_query_completed_; | 218 bool time_query_completed_; |
| 219 | 219 |
| 220 // The time that was received from the last network time fetch made by |
| 221 // CheckTime(). Unlike |network_time_at_least_measurement_|, this time |
| 222 // is not updated when UpdateNetworkTime() is called. Used for UMA |
| 223 // metrics. |
| 224 base::Time last_fetched_time_; |
| 225 |
| 220 // Callbacks to run when the in-progress time fetch completes. | 226 // Callbacks to run when the in-progress time fetch completes. |
| 221 std::vector<base::Closure> fetch_completion_callbacks_; | 227 std::vector<base::Closure> fetch_completion_callbacks_; |
| 222 | 228 |
| 223 base::ThreadChecker thread_checker_; | 229 base::ThreadChecker thread_checker_; |
| 224 | 230 |
| 225 DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker); | 231 DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker); |
| 226 }; | 232 }; |
| 227 | 233 |
| 228 } // namespace network_time | 234 } // namespace network_time |
| 229 | 235 |
| 230 #endif // COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ | 236 #endif // COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ |
| OLD | NEW |