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

Unified Diff: components/network_time/network_time_tracker.cc

Issue 2938003002: Turn on network time querying (on demand only) by default (Closed)
Patch Set: fix stuff Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | testing/variations/fieldtrial_testing_config.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/network_time/network_time_tracker.cc
diff --git a/components/network_time/network_time_tracker.cc b/components/network_time/network_time_tracker.cc
index 18aff16cb893629994c16f2b6c4a74e3a8f49848..5651b61ca8170459532c31e526649156c8d63be7 100644
--- a/components/network_time/network_time_tracker.cc
+++ b/components/network_time/network_time_tracker.cc
@@ -36,8 +36,15 @@
namespace network_time {
+// Network time queries are enabled on all desktop platforms except ChromeOS,
+// which uses tlsdated to set the system time.
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_IOS)
const base::Feature kNetworkTimeServiceQuerying{
"NetworkTimeServiceQuerying", base::FEATURE_DISABLED_BY_DEFAULT};
+#else
+const base::Feature kNetworkTimeServiceQuerying{
+ "NetworkTimeServiceQuerying", base::FEATURE_ENABLED_BY_DEFAULT};
+#endif
namespace {
@@ -111,7 +118,7 @@ const char kVariationsServiceRandomQueryProbability[] =
// not be issued (i.e. StartTimeFetch() will not start time queries.)
//
// - "on-demand-only": Time queries will not be issued except when
-// StartTimeFetch() is called.
+// StartTimeFetch() is called. This is the default value.
//
// - "background-and-on-demand": Time queries will be issued both in the
// background as needed and also on-demand.
@@ -306,7 +313,7 @@ NetworkTimeTracker::FetchBehavior NetworkTimeTracker::GetFetchBehavior() const {
} else if (param == "background-and-on-demand") {
return FETCHES_IN_BACKGROUND_AND_ON_DEMAND;
}
- return FETCH_BEHAVIOR_UNKNOWN;
+ return FETCHES_ON_DEMAND_ONLY;
}
void NetworkTimeTracker::SetTimeServerURLForTesting(const GURL& url) {
« no previous file with comments | « no previous file | testing/variations/fieldtrial_testing_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698