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 "net/base/network_time_notifier.h" | 5 #include "net/base/network_time_notifier.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/i18n/time_formatting.h" | 9 #include "base/i18n/time_formatting.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Clock resolution is platform dependent. | 17 // Clock resolution is platform dependent. |
18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
19 const int64 kTicksResolutionMs = base::Time::kMinLowResolutionThresholdMs; | 19 const int64 kTicksResolutionMs = base::Time::kMinLowResolutionThresholdMs; |
20 #else | 20 #else |
21 const int64 kTicksResolutionMs = 1; // Assume 1ms for non-windows platforms. | 21 const int64 kTicksResolutionMs = 1; // Assume 1ms for non-windows platforms. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 base::MessageLoop::current()->PostTask( | 82 base::MessageLoop::current()->PostTask( |
83 FROM_HERE, | 83 FROM_HERE, |
84 base::Bind(observer_callback, | 84 base::Bind(observer_callback, |
85 network_time_, | 85 network_time_, |
86 network_time_ticks_, | 86 network_time_ticks_, |
87 network_time_uncertainty_)); | 87 network_time_uncertainty_)); |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 } // namespace net | 91 } // namespace net |
OLD | NEW |