| 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 #include "chrome/browser/net/network_time_tracker.h" | 5 #include "chrome/browser/net/network_time_tracker.h" |
| 6 | 6 |
| 7 #include "base/task/sequenced_task_runner.h" | 7 #include "base/sequenced_task_runner.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/io_thread.h" | 9 #include "chrome/browser/io_thread.h" |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 // Helper functions for interacting with the NetworkTimeNotifier. | 13 // Helper functions for interacting with the NetworkTimeNotifier. |
| 14 // Registration happens as follows (assuming tracker lives on thread N): | 14 // Registration happens as follows (assuming tracker lives on thread N): |
| 15 // | Thread N | | UI thread| | IO Thread | | 15 // | Thread N | | UI thread| | IO Thread | |
| 16 // Start | 16 // Start |
| 17 // RegisterObserverOnUIThread | 17 // RegisterObserverOnUIThread |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 void NetworkTimeTracker::OnNetworkTimeUpdate( | 136 void NetworkTimeTracker::OnNetworkTimeUpdate( |
| 137 const base::Time& network_time, | 137 const base::Time& network_time, |
| 138 const base::TimeTicks& network_time_ticks, | 138 const base::TimeTicks& network_time_ticks, |
| 139 const base::TimeDelta& network_time_uncertainty) { | 139 const base::TimeDelta& network_time_uncertainty) { |
| 140 DCHECK(thread_checker_.CalledOnValidThread()); | 140 DCHECK(thread_checker_.CalledOnValidThread()); |
| 141 network_time_ = network_time; | 141 network_time_ = network_time; |
| 142 network_time_ticks_ = network_time_ticks; | 142 network_time_ticks_ = network_time_ticks; |
| 143 network_time_uncertainty_ = network_time_uncertainty; | 143 network_time_uncertainty_ = network_time_uncertainty; |
| 144 } | 144 } |
| 145 | 145 |
| OLD | NEW |