Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: net/base/network_time_notifier.h

Issue 18054009: Use a direct include of time headers in net/, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/network_change_notifier_win.cc ('k') | net/base/sdch_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 NET_BASE_NETWORK_TIME_NOTIFIER_H_ 5 #ifndef NET_BASE_NETWORK_TIME_NOTIFIER_H_
6 #define NET_BASE_NETWORK_TIME_NOTIFIER_H_ 6 #define NET_BASE_NETWORK_TIME_NOTIFIER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "base/time.h"
16 #include "base/time/tick_clock.h" 15 #include "base/time/tick_clock.h"
16 #include "base/time/time.h"
17 #include "net/base/net_export.h" 17 #include "net/base/net_export.h"
18 18
19 namespace net { 19 namespace net {
20 20
21 // A class that receives updates for and maintains network time. Network time 21 // A class that receives updates for and maintains network time. Network time
22 // sources can pass updates through UpdateNetworkTime, and network time 22 // sources can pass updates through UpdateNetworkTime, and network time
23 // consumers can register as observers. This class is not thread-safe. 23 // consumers can register as observers. This class is not thread-safe.
24 class NET_EXPORT NetworkTimeNotifier { 24 class NET_EXPORT NetworkTimeNotifier {
25 public: 25 public:
26 // Callback for observers to receive network time updates. 26 // Callback for observers to receive network time updates.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // A vector of callbacks is used, rather than an ObserverList, so that the 75 // A vector of callbacks is used, rather than an ObserverList, so that the
76 // lifetime of the observer can be bound to the callback. 76 // lifetime of the observer can be bound to the callback.
77 std::vector<ObserverCallback> observers_; 77 std::vector<ObserverCallback> observers_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(NetworkTimeNotifier); 79 DISALLOW_COPY_AND_ASSIGN(NetworkTimeNotifier);
80 }; 80 };
81 81
82 } // namespace net 82 } // namespace net
83 83
84 #endif // NET_BASE_NETWORK_TIME_NOTIFIER_H_ 84 #endif // NET_BASE_NETWORK_TIME_NOTIFIER_H_
OLDNEW
« no previous file with comments | « net/base/network_change_notifier_win.cc ('k') | net/base/sdch_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698