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

Unified Diff: components/network_time/network_time_tracker.h

Issue 2421143002: Fix broken clockstate.network2 histogram and add unit test (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 5e31411d16257b3e1b4b34cc30c5f5d9852f5336..72f342198d314a46e124aa4f03769bea46451d77 100644
--- a/components/network_time/network_time_tracker.h
+++ b/components/network_time/network_time_tracker.h
@@ -127,6 +127,8 @@ class NetworkTimeTracker : public net::URLFetcherDelegate {
base::TimeDelta GetTimerDelayForTesting() const;
+ void EnableTimeQueriesForTesting();
+
private:
// Checks whether a network time query should be issued, and issues one if so.
// Upon response, execution resumes in |OnURLFetchComplete|.
@@ -161,6 +163,8 @@ class NetworkTimeTracker : public net::URLFetcherDelegate {
base::TimeTicks fetch_started_;
std::unique_ptr<client_update_protocol::Ecdsa> query_signer_;
+ bool enable_time_queries_for_testing_ = false;
+
// Run by WaitForFetchForTesting() and quit by OnURLFetchComplete().
base::RunLoop* run_loop_for_testing_ = nullptr;
« 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