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

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

Issue 2448943004: Add experimental feature info to certificate reports (Closed)
Patch Set: undo more unnecessary changes Created 4 years, 1 month 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
OLDNEW
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 28 matching lines...) Expand all
39 39
40 // Clock resolution is platform dependent. 40 // Clock resolution is platform dependent.
41 #if defined(OS_WIN) 41 #if defined(OS_WIN)
42 const int64_t kTicksResolutionMs = base::Time::kMinLowResolutionThresholdMs; 42 const int64_t kTicksResolutionMs = base::Time::kMinLowResolutionThresholdMs;
43 #else 43 #else
44 const int64_t kTicksResolutionMs = 1; // Assume 1ms for non-windows platforms. 44 const int64_t kTicksResolutionMs = 1; // Assume 1ms for non-windows platforms.
45 #endif 45 #endif
46 46
47 // Variations Service feature that enables network time service querying. 47 // Variations Service feature that enables network time service querying.
48 extern const base::Feature kNetworkTimeServiceQuerying; 48 extern const base::Feature kNetworkTimeServiceQuerying;
49 // Parameter name for the network time experiment that controls whether
50 // time queries can be issued on-demand.
jwd 2016/11/03 15:15:34 Seeing as I've asked you to reduce the magicness o
51 extern const char kVariationsServiceEnableFetchesOnDemand[];
49 52
50 // A class that receives network time updates and can provide the network time 53 // A class that receives network time updates and can provide the network time
51 // for a corresponding local time. This class is not thread safe. 54 // for a corresponding local time. This class is not thread safe.
52 class NetworkTimeTracker : public net::URLFetcherDelegate { 55 class NetworkTimeTracker : public net::URLFetcherDelegate {
53 public: 56 public:
54 // Describes the result of a GetNetworkTime() call, describing whether 57 // Describes the result of a GetNetworkTime() call, describing whether
55 // network time was available and if not, why not. 58 // network time was available and if not, why not.
56 enum NetworkTimeResult { 59 enum NetworkTimeResult {
57 // Network time is available. 60 // Network time is available.
58 NETWORK_TIME_AVAILABLE, 61 NETWORK_TIME_AVAILABLE,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 std::vector<base::Closure> fetch_completion_callbacks_; 204 std::vector<base::Closure> fetch_completion_callbacks_;
202 205
203 base::ThreadChecker thread_checker_; 206 base::ThreadChecker thread_checker_;
204 207
205 DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker); 208 DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker);
206 }; 209 };
207 210
208 } // namespace network_time 211 } // namespace network_time
209 212
210 #endif // COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ 213 #endif // COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698