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

Issue 1835823002: network_time_tracker: add temporary time protocol. (Closed)

Created:
4 years, 8 months ago by mab
Modified:
4 years, 7 months ago
CC:
chromium-reviews, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, droger+watchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://crrev.com/2f07cb9a5744a021e3d7c34e9c5de5ef6d246f27 Cr-Commit-Position: refs/heads/master@{#392711}

Patch Set 1 #

Patch Set 2 : fix build? #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : msvc #

Total comments: 22

Patch Set 6 : estark review 1 #

Total comments: 4

Patch Set 7 : estark review 2 #

Patch Set 8 : Use real URL and public key. Add iOS. #

Patch Set 9 : rebase #

Patch Set 10 : a wild dependency check appears! #

Total comments: 11

Patch Set 11 : zea review 1 #

Patch Set 12 : rebase (note: scoped_ptr -> std::unique_ptr) #

Total comments: 1

Patch Set 13 : zea review 2, and fix test #

Total comments: 49

Patch Set 14 : rsleevi review 1 #

Total comments: 8

Patch Set 15 : comments from rsesek, mmenke, rsleevi #

Patch Set 16 : rebase #

Patch Set 17 : scoped_refptr #

Total comments: 17

Patch Set 18 : rsleevi comments #

Patch Set 19 : rsleevi comments #

Patch Set 20 : move header #

Patch Set 21 : and iOS #

Total comments: 22

Patch Set 22 : mmenke comments #

Patch Set 23 : add test of signed bad data #

Total comments: 8

Patch Set 24 : mmenke comments #

Patch Set 25 : cleanup #

Patch Set 26 : patch estark's 1925793002 so this is Finch-disabled on commit #

Patch Set 27 : finch test fix #

Patch Set 28 : rebase #

Patch Set 29 : fix memory leak #

Patch Set 30 : lint #

Unified diffs Side-by-side diffs Delta from patch set Stats (+591 lines, -56 lines) Patch
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/test/base/testing_browser_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M components/client_update_protocol/ecdsa.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +9 lines, -7 lines 0 comments Download
M components/client_update_protocol/ecdsa.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +5 lines, -1 line 0 comments Download
M components/client_update_protocol/ecdsa_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +2 lines, -7 lines 0 comments Download
M components/network_time/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M components/network_time/DEPS View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M components/network_time/network_time_tracker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 3 chunks +61 lines, -4 lines 0 comments Download
M components/network_time/network_time_tracker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 6 chunks +230 lines, -2 lines 0 comments Download
M components/network_time/network_time_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 14 chunks +251 lines, -21 lines 0 comments Download
M components/ssl_errors/error_classification_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 2 chunks +6 lines, -1 line 0 comments Download
M ios/chrome/browser/application_context_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +7 lines, -5 lines 0 comments Download
M ios/chrome/test/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/test/testing_application_context.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 69 (18 generated)
mab
4 years, 8 months ago (2016-03-28 04:59:10 UTC) #3
estark
https://codereview.chromium.org/1835823002/diff/80001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/80001/components/network_time/network_time_tracker.cc#newcode127 components/network_time/network_time_tracker.cc:127: if (GetNetworkTime(&network_time, nullptr)) { suggested comment: // If GetNetworkTime() ...
4 years, 8 months ago (2016-03-28 17:35:10 UTC) #4
mab
Thanks! +waffles for CUP changes and server interactions. https://codereview.chromium.org/1835823002/diff/80001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/80001/components/network_time/network_time_tracker.cc#newcode127 components/network_time/network_time_tracker.cc:127: if ...
4 years, 8 months ago (2016-03-28 19:56:26 UTC) #7
estark
Thanks, lgtm. https://codereview.chromium.org/1835823002/diff/100001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/100001/components/network_time/network_time_tracker.cc#newcode93 components/network_time/network_time_tracker.cc:93: pref_service_(pref_service) { Initialize |query_signer_| and |time_fetcher_| to ...
4 years, 8 months ago (2016-03-28 23:18:59 UTC) #8
mab
https://codereview.chromium.org/1835823002/diff/100001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/100001/components/network_time/network_time_tracker.cc#newcode93 components/network_time/network_time_tracker.cc:93: pref_service_(pref_service) { Whoa. Surprised that's necessary for scoped_ptr. Done. ...
4 years, 8 months ago (2016-03-29 03:13:04 UTC) #9
mab
@waffles: can you have a look at the CUP-related bits? Thanks.
4 years, 7 months ago (2016-04-26 02:01:38 UTC) #10
waffles
lgtm https://codereview.chromium.org/1835823002/diff/180001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/180001/components/network_time/network_time_tracker.cc#newcode71 components/network_time/network_time_tracker.cc:71: return response_headers->EnumerateHeader(nullptr, "x-cup-server-proof", Hm, filed crbug/606958 for this, ...
4 years, 7 months ago (2016-04-26 21:16:47 UTC) #11
mab
+sky can you review browser_process_impl.cc? +rohitrao can you review application_context_impl.cc? +zea can you approve components/network_time? ...
4 years, 7 months ago (2016-04-27 18:07:41 UTC) #13
rohitrao (ping after 24h)
ios lgtm
4 years, 7 months ago (2016-04-27 18:12:00 UTC) #14
Nicolas Zea
Couple nits https://codereview.chromium.org/1835823002/diff/180001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/180001/components/network_time/network_time_tracker.cc#newcode90 components/network_time/network_time_tracker.cc:90: time_fetcher_(nullptr), nit: both time_fetcher_ and query_signer_ are ...
4 years, 7 months ago (2016-04-27 18:58:22 UTC) #15
mab
zea: PTAL https://codereview.chromium.org/1835823002/diff/180001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/180001/components/network_time/network_time_tracker.cc#newcode90 components/network_time/network_time_tracker.cc:90: time_fetcher_(nullptr), On 2016/04/27 18:58:22, Nicolas Zea wrote: ...
4 years, 7 months ago (2016-04-27 20:00:37 UTC) #16
Nicolas Zea
LGTM https://codereview.chromium.org/1835823002/diff/220001/components/network_time/network_time_tracker.h File components/network_time/network_time_tracker.h (right): https://codereview.chromium.org/1835823002/diff/220001/components/network_time/network_time_tracker.h#newcode87 components/network_time/network_time_tracker.h:87: // If syncrhonization has been lost, sends a ...
4 years, 7 months ago (2016-04-27 20:44:06 UTC) #17
sky
browser_process_impl.cc LGTM
4 years, 7 months ago (2016-04-27 21:17:00 UTC) #18
mab
rsleevi: added you because of this message: ** Presubmit Messages ** Missing LGTM from OWNERS ...
4 years, 7 months ago (2016-04-27 21:51:02 UTC) #20
Ryan Sleevi
rsesek: See one question below about JSON parsing from a trusted (Google) URL in the ...
4 years, 7 months ago (2016-04-28 01:08:34 UTC) #22
mab
Re: thundering herd scenarios, there are a few protections here: - Low frequency, no more ...
4 years, 7 months ago (2016-04-28 02:29:04 UTC) #23
mmenke
https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc#newcode183 components/network_time/network_time_tracker.cc:183: if (!source->GetResponseAsString(&response_body)) { On 2016/04/28 02:29:04, mab wrote: > ...
4 years, 7 months ago (2016-04-28 15:17:09 UTC) #24
Robert Sesek
https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc#newcode194 components/network_time/network_time_tracker.cc:194: std::unique_ptr<base::Value> value = reader.Read(response_body); On 2016/04/28 01:08:34, Ryan Sleevi ...
4 years, 7 months ago (2016-04-28 16:51:23 UTC) #25
mmenke
https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc#newcode194 components/network_time/network_time_tracker.cc:194: std::unique_ptr<base::Value> value = reader.Read(response_body); On 2016/04/28 16:51:23, Robert Sesek ...
4 years, 7 months ago (2016-04-28 16:54:29 UTC) #26
waffles
https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc#newcode194 components/network_time/network_time_tracker.cc:194: std::unique_ptr<base::Value> value = reader.Read(response_body); On 2016/04/28 16:54:29, mmenke wrote: ...
4 years, 7 months ago (2016-04-28 16:58:57 UTC) #27
Robert Sesek
https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc#newcode194 components/network_time/network_time_tracker.cc:194: std::unique_ptr<base::Value> value = reader.Read(response_body); On 2016/04/28 16:58:57, waffles wrote: ...
4 years, 7 months ago (2016-04-28 22:37:32 UTC) #28
mab
https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/240001/components/network_time/network_time_tracker.cc#newcode183 components/network_time/network_time_tracker.cc:183: if (!source->GetResponseAsString(&response_body)) { OK, I did the latter (= ...
4 years, 7 months ago (2016-04-29 19:42:07 UTC) #29
waffles
https://codereview.chromium.org/1835823002/diff/260001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/260001/components/network_time/network_time_tracker.cc#newcode56 components/network_time/network_time_tracker.cc:56: const char kTimeServiceURL[] = "http://clients2.google.com/time/1/current"; mmenke: Please contact me ...
4 years, 7 months ago (2016-04-29 19:51:22 UTC) #30
mmenke
I'll plan to review the test next week. https://codereview.chromium.org/1835823002/diff/260001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/260001/components/network_time/network_time_tracker.cc#newcode56 components/network_time/network_time_tracker.cc:56: const ...
4 years, 7 months ago (2016-04-29 19:59:44 UTC) #31
Ryan Sleevi
https://codereview.chromium.org/1835823002/diff/260001/components/network_time/network_time_tracker.h File components/network_time/network_time_tracker.h (right): https://codereview.chromium.org/1835823002/diff/260001/components/network_time/network_time_tracker.h#newcode56 components/network_time/network_time_tracker.h:56: scoped_refptr<net::URLRequestContextGetter>& getter); On 2016/04/29 19:42:07, mab wrote: > In ...
4 years, 7 months ago (2016-04-29 21:16:29 UTC) #32
mab
I think I've addressed all outstanding comments, so please let me know if not. https://codereview.chromium.org/1835823002/diff/260001/components/network_time/network_time_tracker.h ...
4 years, 7 months ago (2016-04-29 21:35:36 UTC) #33
Ryan Sleevi
Double check with mmenke on the URLFetcher changes (I think they're good), but LGTM % ...
4 years, 7 months ago (2016-04-29 22:54:16 UTC) #34
mab
https://codereview.chromium.org/1835823002/diff/320001/components/client_update_protocol/ecdsa.h File components/client_update_protocol/ecdsa.h (right): https://codereview.chromium.org/1835823002/diff/320001/components/client_update_protocol/ecdsa.h#newcode69 components/client_update_protocol/ecdsa.h:69: friend class network_time::NetworkTimeTrackerTest; I didn't know the |ForTesting| suffix ...
4 years, 7 months ago (2016-04-29 23:30:09 UTC) #35
Ryan Sleevi
https://codereview.chromium.org/1835823002/diff/320001/components/network_time/network_time_tracker.h File components/network_time/network_time_tracker.h (right): https://codereview.chromium.org/1835823002/diff/320001/components/network_time/network_time_tracker.h#newcode17 components/network_time/network_time_tracker.h:17: #include "net/url_request/url_request_context_getter.h" On 2016/04/29 23:30:09, mab wrote: > Actually ...
4 years, 7 months ago (2016-04-29 23:35:30 UTC) #36
waffles
https://codereview.chromium.org/1835823002/diff/320001/components/client_update_protocol/ecdsa.h File components/client_update_protocol/ecdsa.h (right): https://codereview.chromium.org/1835823002/diff/320001/components/client_update_protocol/ecdsa.h#newcode69 components/client_update_protocol/ecdsa.h:69: friend class network_time::NetworkTimeTrackerTest; On 2016/04/29 23:30:08, mab wrote: > ...
4 years, 7 months ago (2016-04-30 00:03:36 UTC) #37
mab
https://codereview.chromium.org/1835823002/diff/320001/components/network_time/network_time_tracker.h File components/network_time/network_time_tracker.h (right): https://codereview.chromium.org/1835823002/diff/320001/components/network_time/network_time_tracker.h#newcode17 components/network_time/network_time_tracker.h:17: #include "net/url_request/url_request_context_getter.h" OK, done.
4 years, 7 months ago (2016-04-30 00:37:19 UTC) #38
mmenke
Set up of the context and test server looks good to me, though I do ...
4 years, 7 months ago (2016-05-02 17:47:29 UTC) #39
mab
https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker.cc File components/network_time/network_time_tracker.cc (right): https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker.cc#newcode209 components/network_time/network_time_tracker.cc:209: query_timer_.Reset(); Added a comment explaining why this is here. ...
4 years, 7 months ago (2016-05-05 19:57:42 UTC) #40
mmenke
https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker_unittest.cc File components/network_time/network_time_tracker_unittest.cc (right): https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker_unittest.cc#newcode399 components/network_time/network_time_tracker_unittest.cc:399: TEST_F(NetworkTimeTrackerTest, UpdateFromNetworkBadSignature) { On 2016/05/05 19:57:42, mab wrote: > ...
4 years, 7 months ago (2016-05-05 20:23:55 UTC) #41
mab
https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker_unittest.cc File components/network_time/network_time_tracker_unittest.cc (right): https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker_unittest.cc#newcode399 components/network_time/network_time_tracker_unittest.cc:399: TEST_F(NetworkTimeTrackerTest, UpdateFromNetworkBadSignature) { Ah, I see what you're saying. ...
4 years, 7 months ago (2016-05-05 22:24:36 UTC) #42
mmenke
LGTM! Though I did not do an exhaustive final pass. https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker_unittest.cc File components/network_time/network_time_tracker_unittest.cc (right): https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker_unittest.cc#newcode67 ...
4 years, 7 months ago (2016-05-06 15:00:37 UTC) #43
mab
https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker_unittest.cc File components/network_time/network_time_tracker_unittest.cc (right): https://codereview.chromium.org/1835823002/diff/400001/components/network_time/network_time_tracker_unittest.cc#newcode67 components/network_time/network_time_tracker_unittest.cc:67: base::MessageLoop::current()->RunUntilIdle(); I ended up doing this by simply passing ...
4 years, 7 months ago (2016-05-06 18:12:37 UTC) #44
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1835823002/500001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1835823002/500001
4 years, 7 months ago (2016-05-06 21:54:24 UTC) #46
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/224954)
4 years, 7 months ago (2016-05-06 22:33:27 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1835823002/520001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1835823002/520001
4 years, 7 months ago (2016-05-06 22:50:07 UTC) #51
commit-bot: I haz the power
Committed patchset #27 (id:520001)
4 years, 7 months ago (2016-05-06 23:59:41 UTC) #53
commit-bot: I haz the power
Patchset 27 (id:??) landed as https://crrev.com/ee2016a374b73ba35508ae26837755a23b3defa4 Cr-Commit-Position: refs/heads/master@{#392208}
4 years, 7 months ago (2016-05-07 00:01:07 UTC) #55
Nico
A revert of this CL (patchset #27 id:520001) has been created in https://codereview.chromium.org/1956173002/ by thakis@chromium.org. ...
4 years, 7 months ago (2016-05-07 17:49:49 UTC) #56
mab
rsleevi: I've uploaded my patch, reflecting your comments, to this the original issue. Will that ...
4 years, 7 months ago (2016-05-10 18:14:23 UTC) #57
Ryan Sleevi
On 2016/05/10 18:14:23, mab wrote: > rsleevi: I've uploaded my patch, reflecting your comments, to ...
4 years, 7 months ago (2016-05-10 18:15:39 UTC) #59
Ryan Sleevi
LGTM. The changes you made are also correct (for URLFetchers), so I would suggest CQing ...
4 years, 7 months ago (2016-05-10 18:17:03 UTC) #60
mab
CQ looks fine, but I wouldn't mind being sure, so I don't have to roll ...
4 years, 7 months ago (2016-05-10 19:12:32 UTC) #61
Ryan Sleevi
On 2016/05/10 19:12:32, mab wrote: > CQ looks fine, but I wouldn't mind being sure, ...
4 years, 7 months ago (2016-05-10 19:18:55 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1835823002/580001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1835823002/580001
4 years, 7 months ago (2016-05-10 20:51:26 UTC) #65
commit-bot: I haz the power
Committed patchset #30 (id:580001)
4 years, 7 months ago (2016-05-10 20:56:04 UTC) #67
commit-bot: I haz the power
4 years, 7 months ago (2016-05-10 20:57:19 UTC) #69
Message was sent while issue was closed.
Patchset 30 (id:??) landed as
https://crrev.com/2f07cb9a5744a021e3d7c34e9c5de5ef6d246f27
Cr-Commit-Position: refs/heads/master@{#392711}

Powered by Google App Engine
This is Rietveld 408576698