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

Unified Diff: components/network_time/network_time_tracker.h

Issue 2415703005: Refine NetworkTimeTracker histograms (Closed)
Patch Set: 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
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..0c00f75837f3c4d0006d468d64bd219c53e4c6e1 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,11 @@ class NetworkTimeTracker : public net::URLFetcherDelegate {
// UpdateNetworkTime(...) implementation for details.
base::TimeDelta network_time_uncertainty_;
+ // True if a time query has failed (either a network error, a non-200
mab 2016/10/14 06:35:01 like true if any time query has failed ever?
estark 2016/10/14 07:23:46 In this object's lifetime, yeah. It's just used to
+ // HTTP status code, or a bad response, such as a bad signature or
+ // malformed data).
+ bool time_query_failed_;
+
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') | components/network_time/network_time_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698