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

Side by Side Diff: components/network_time/network_time_tracker.h

Issue 296453005: Componentize chrome/browser/network_time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix iOS Created 6 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ 5 #ifndef COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_
6 #define CHROME_BROWSER_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ 6 #define COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 11
12 class PrefRegistrySimple; 12 class PrefRegistrySimple;
13 class PrefService; 13 class PrefService;
14 14
15 namespace base { 15 namespace base {
16 class TickClock; 16 class TickClock;
17 } 17 }
18 18
19 namespace network_time {
20
19 // A class that receives network time updates and can provide the network time 21 // A class that receives network time updates and can provide the network time
20 // for a corresponding local time. This class is not thread safe. 22 // for a corresponding local time. This class is not thread safe.
21 class NetworkTimeTracker { 23 class NetworkTimeTracker {
22 public: 24 public:
23 static void RegisterPrefs(PrefRegistrySimple* registry); 25 static void RegisterPrefs(PrefRegistrySimple* registry);
24 26
25 NetworkTimeTracker(scoped_ptr<base::TickClock> tick_clock, 27 NetworkTimeTracker(scoped_ptr<base::TickClock> tick_clock,
26 PrefService* pref_service); 28 PrefService* pref_service);
27 ~NetworkTimeTracker(); 29 ~NetworkTimeTracker();
28 30
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // See UpdateNetworkTime(..) implementation for details. 68 // See UpdateNetworkTime(..) implementation for details.
67 base::TimeDelta network_time_uncertainty_; 69 base::TimeDelta network_time_uncertainty_;
68 70
69 base::ThreadChecker thread_checker_; 71 base::ThreadChecker thread_checker_;
70 72
71 bool received_network_time_; 73 bool received_network_time_;
72 74
73 DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker); 75 DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker);
74 }; 76 };
75 77
76 #endif // CHROME_BROWSER_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ 78 } // namespace network_time
79
80 #endif // COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_
OLDNEW
« no previous file with comments | « components/network_time/network_time_pref_names.cc ('k') | components/network_time/network_time_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698