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

Unified Diff: components/network_time/network_time_tracker.h

Issue 2415703005: Refine NetworkTimeTracker histograms (Closed)
Patch Set: mab comments Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/network_time/network_time_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/network_time/network_time_tracker.h
diff --git a/components/network_time/network_time_tracker.h b/components/network_time/network_time_tracker.h
index ae1f26820721cd6d77daa4f80c8baa776eef7581..5e31411d16257b3e1b4b34cc30c5f5d9852f5336 100644
--- a/components/network_time/network_time_tracker.h
+++ b/components/network_time/network_time_tracker.h
@@ -62,8 +62,20 @@ class NetworkTimeTracker : public net::URLFetcherDelegate {
// of sync due to, for example, a suspend/resume.
NETWORK_TIME_SYNC_LOST,
// Network time is unavailable because the tracker has not yet
- // retrieved a time from the network.
- NETWORK_TIME_NO_SYNC,
+ // attempted to retrieve a time from the network.
+ NETWORK_TIME_NO_SYNC_ATTEMPT,
+ // Network time is unavailable because the tracker has not yet
+ // successfully retrieved a time from the network (at least one
+ // attempt has been made but all have failed).
+ NETWORK_TIME_NO_SUCCESSFUL_SYNC,
+ // Network time is unavailable because the tracker has not yet
+ // attempted to retrieve a time from the network, but the first
+ // attempt is currently pending.
+ NETWORK_TIME_FIRST_SYNC_PENDING,
+ // Network time is unavailable because the tracker has made failed
+ // attempts to retrieve a time from the network, but an attempt is
+ // currently pending.
+ NETWORK_TIME_SUBSEQUENT_SYNC_PENDING,
};
static void RegisterPrefs(PrefRegistrySimple* registry);
@@ -175,6 +187,10 @@ class NetworkTimeTracker : public net::URLFetcherDelegate {
// UpdateNetworkTime(...) implementation for details.
base::TimeDelta network_time_uncertainty_;
+ // True if any time query has completed (but not necessarily succeeded) in
+ // this NetworkTimeTracker's lifetime.
+ bool time_query_completed_;
+
base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker);
« no previous file with comments | « no previous file | components/network_time/network_time_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698