network_time_tracker: add temporary time protocol.

This adds queries of the temporary secure time server, with signature
verification, and a very conservative scheduler.  (Checks once per hour,
queries only if sync believed to be lost.)

BUG=589700

Committed: https://crrev.com/ee2016a374b73ba35508ae26837755a23b3defa4
Cr-Commit-Position: refs/heads/master@{#392208}

Review-Url: https://codereview.chromium.org/1835823002
Cr-Commit-Position: refs/heads/master@{#392711}
diff --git a/components/client_update_protocol/ecdsa.cc b/components/client_update_protocol/ecdsa.cc
index dc41a73..7154793 100644
--- a/components/client_update_protocol/ecdsa.cc
+++ b/components/client_update_protocol/ecdsa.cc
@@ -98,9 +98,13 @@
   return base::WrapUnique(new Ecdsa(key_version, public_key));
 }
 
+void Ecdsa::OverrideNonceForTesting(int key_version, uint32_t nonce) {
+  DCHECK(!request_query_cup2key_.empty());
+  request_query_cup2key_ = base::StringPrintf("%d:%u", pub_key_version_, nonce);
+}
+
 void Ecdsa::SignRequest(const base::StringPiece& request_body,
                         std::string* query_params) {
-  DCHECK(!request_body.empty());
   DCHECK(query_params);
 
   // Generate a random nonce to use for freshness, build the cup2key query