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

Issue 908863004: Initial implementation for CertNetFetcher. (Closed)

Created:
5 years, 10 months ago by eroman
Modified:
5 years, 8 months ago
Reviewers:
davidben
CC:
chromium-reviews, cbentzel+watch_chromium.org, mattm, davidben, nharper, Ryan Sleevi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Initial implementation for CertNetFetcher. CertNetFetcher is a class for issuing and cancelling network fetches, that will be used by CertVerifier. It fetches http:// AIA and CRL URLs. This initial implementation has some remaining TODOs around: - Add POST parameters - Add cache bypass controls - Add maximum requests thresholds - Add more tests for cancellation/de-duplication BUG=455366 NOPRESUBMIT=true Committed: https://crrev.com/0fad62b76d552f09f8a1c90edce26fe64df9a7f9 Cr-Commit-Position: refs/heads/master@{#324261}

Patch Set 1 #

Patch Set 2 : add a missing header #

Total comments: 7

Patch Set 3 : Address some of matt's comments #

Total comments: 43

Patch Set 4 : Address sleevi's comments #

Patch Set 5 : fix a typeo #

Patch Set 6 : Remove a redundant timer #

Patch Set 7 : refactor tests some #

Patch Set 8 : Switch to using RunLoop() instead of MessageLoop::Quit() #

Total comments: 30

Patch Set 9 : Merge CL/906393002 into this review #

Patch Set 10 : change int --> net::Error #

Patch Set 11 : more net::Error #

Patch Set 12 : Rework the CheckedNumeric codeblock #

Patch Set 13 : Address remaining feedback #

Patch Set 14 : Rebase #

Patch Set 15 : rebase onto master #

Patch Set 16 : fix compile issue from nacl #

Total comments: 20

Patch Set 17 : rebase onto master #

Patch Set 18 : Split out of cert/ #

Patch Set 19 : address more feedback #

Total comments: 50

Patch Set 20 : Use a scoped_ptr<Request> to handle cancellation #

Patch Set 21 : Address more feedback #

Patch Set 22 : put rununtilidle in the right place this time #

Patch Set 23 : more #

Patch Set 24 : rebase #

Patch Set 25 : reset the callback on completion #

Total comments: 11

Patch Set 26 : Address David's comments #

Total comments: 2

Patch Set 27 : address more comments #

Patch Set 28 : disable on ios #

Patch Set 29 : add missing comma #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1526 lines, -2 lines) Patch
M net/BUILD.gn 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 1 chunk +1 line, -0 lines 0 comments Download
A net/cert/cert_net_fetcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +106 lines, -0 lines 0 comments Download
A net/cert_net/README View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +6 lines, -0 lines 0 comments Download
A net/cert_net/cert_net_fetcher_impl.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 1 chunk +107 lines, -0 lines 0 comments Download
A net/cert_net/cert_net_fetcher_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 1 chunk +547 lines, -0 lines 0 comments Download
A net/cert_net/cert_net_fetcher_impl_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 1 chunk +729 lines, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/404.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A + net/data/cert_net_fetcher_impl_unittest/404.html.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/500.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A + net/data/cert_net_fetcher_impl_unittest/500.html.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/cacheable_1hr.crt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A + net/data/cert_net_fetcher_impl_unittest/cacheable_1hr.crt.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/cert.crt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/cert.crt.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/certs.p7c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/certs.p7c.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/downloadable.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/downloadable.js.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/foo.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A + net/data/cert_net_fetcher_impl_unittest/foo.txt.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 0 chunks +-1 lines, --1 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/gzipped_crl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Binary file 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/gzipped_crl.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/redirect_https View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/redirect_https.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/root.crl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A net/data/cert_net_fetcher_impl_unittest/root.crl.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M net/net.gyp 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 1 chunk +1 line, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (14 generated)
eroman
5 years, 10 months ago (2015-02-09 18:12:28 UTC) #2
eroman
(Adding in some other potential reviewers, to try and lighten Sleevi's load)
5 years, 10 months ago (2015-02-09 21:17:57 UTC) #3
mattm
Just a few comments from first look over. Nothing major jumped out, but I'll try ...
5 years, 10 months ago (2015-02-10 05:22:14 UTC) #5
eroman
https://codereview.chromium.org/908863004/diff/20001/net/cert/cert_net_fetcher.cc File net/cert/cert_net_fetcher.cc (right): https://codereview.chromium.org/908863004/diff/20001/net/cert/cert_net_fetcher.cc#newcode277 net/cert/cert_net_fetcher.cc:277: // In practice all URLs fetched are HTTPS, but ...
5 years, 10 months ago (2015-02-11 03:51:52 UTC) #6
Ryan Sleevi
I'm still working through the unit tests... https://codereview.chromium.org/908863004/diff/40001/net/cert/cert_net_fetcher.cc File net/cert/cert_net_fetcher.cc (right): https://codereview.chromium.org/908863004/diff/40001/net/cert/cert_net_fetcher.cc#newcode115 net/cert/cert_net_fetcher.cc:115: const RequestParams& ...
5 years, 10 months ago (2015-02-11 08:41:54 UTC) #7
eroman
https://codereview.chromium.org/908863004/diff/40001/net/cert/cert_net_fetcher.cc File net/cert/cert_net_fetcher.cc (right): https://codereview.chromium.org/908863004/diff/40001/net/cert/cert_net_fetcher.cc#newcode371 net/cert/cert_net_fetcher.cc:371: // not iterated through. On 2015/02/11 08:41:53, Ryan Sleevi ...
5 years, 10 months ago (2015-02-11 20:15:16 UTC) #8
eroman
@rsleevi: If you haven't started reviewing unit-tests yet I can apply some further cleanups to ...
5 years, 10 months ago (2015-02-11 23:18:08 UTC) #9
eroman
https://codereview.chromium.org/908863004/diff/20001/net/cert/cert_net_fetcher_unittest.cc File net/cert/cert_net_fetcher_unittest.cc (right): https://codereview.chromium.org/908863004/diff/20001/net/cert/cert_net_fetcher_unittest.cc#newcode93 net/cert/cert_net_fetcher_unittest.cc:93: base::MessageLoop::current()->Run(); On 2015/02/11 03:51:52, eroman wrote: > On 2015/02/10 ...
5 years, 10 months ago (2015-02-13 22:11:38 UTC) #10
eroman
ping
5 years, 10 months ago (2015-02-19 19:45:45 UTC) #11
Ryan Sleevi
Sincerest apologies for the delay, and for the layering violation that I missed. https://codereview.chromium.org/908863004/diff/140001/net/cert/cert_net_fetcher.cc File ...
5 years, 10 months ago (2015-02-23 20:25:23 UTC) #12
eroman
https://codereview.chromium.org/908863004/diff/140001/net/cert/cert_net_fetcher.cc File net/cert/cert_net_fetcher.cc (right): https://codereview.chromium.org/908863004/diff/140001/net/cert/cert_net_fetcher.cc#newcode36 net/cert/cert_net_fetcher.cc:36: const int kNetErrorNot200HttpResponse = ERR_FAILED; On 2015/02/23 20:25:22, Ryan ...
5 years, 10 months ago (2015-02-23 23:36:58 UTC) #13
eroman
Ping! Ryan, do you want me to change the reviewer to David or Matt?
5 years, 9 months ago (2015-03-24 21:39:57 UTC) #14
Ryan Sleevi
Yeah, going to punt to davidben@ to do the majority of this. My biggest concern ...
5 years, 9 months ago (2015-03-25 06:16:38 UTC) #16
eroman
I will split off a new subdirectory, "cert_fetcher/" and then put the implementation in there, ...
5 years, 9 months ago (2015-03-25 18:30:24 UTC) #17
eroman
Or a different organization to consider would be to pull //net/cert out of //net alltogether, ...
5 years, 9 months ago (2015-03-25 18:36:25 UTC) #18
Ryan Sleevi
On 2015/03/25 18:30:24, eroman wrote: > I will split off a new subdirectory, "cert_fetcher/" and ...
5 years, 9 months ago (2015-03-25 18:41:15 UTC) #19
Ryan Sleevi
On 2015/03/25 18:36:25, eroman wrote: > Or a different organization to consider would be to ...
5 years, 9 months ago (2015-03-25 18:44:18 UTC) #20
eroman
I am referring to the *runtime* circular dependency when using it. I agree that the ...
5 years, 9 months ago (2015-03-25 18:45:56 UTC) #21
Ryan Sleevi
On 2015/03/25 18:45:56, eroman wrote: > I am referring to the *runtime* circular dependency when ...
5 years, 9 months ago (2015-03-25 19:11:43 UTC) #22
eroman
No I don't have a solution to that
5 years, 9 months ago (2015-03-25 19:19:24 UTC) #23
eroman
I split things between an interface (CertNetFetcher) in net/cert, and an implementation (CertNetFetcherImpl) in net/cert_net. ...
5 years, 9 months ago (2015-03-26 03:50:49 UTC) #24
eroman
(Promoting David to primary reviewer, and moved Ryan to the cc-list)
5 years, 9 months ago (2015-03-26 03:58:11 UTC) #26
davidben
I'm apparently distractable when doing large reviews and didn't finish going through all of it. ...
5 years, 9 months ago (2015-03-27 23:34:32 UTC) #27
davidben
(and the rest of the review) https://codereview.chromium.org/908863004/diff/360001/net/cert_net/cert_net_fetcher_impl.cc File net/cert_net/cert_net_fetcher_impl.cc (right): https://codereview.chromium.org/908863004/diff/360001/net/cert_net/cert_net_fetcher_impl.cc#newcode191 net/cert_net/cert_net_fetcher_impl.cc:191: // (result_net_error_code_ et ...
5 years, 8 months ago (2015-03-31 20:52:26 UTC) #28
eroman
https://codereview.chromium.org/908863004/diff/360001/net/cert/cert_net_fetcher.h File net/cert/cert_net_fetcher.h (right): https://codereview.chromium.org/908863004/diff/360001/net/cert/cert_net_fetcher.h#newcode72 net/cert/cert_net_fetcher.h:72: virtual void CancelRequest(RequestId request) = 0; On 2015/03/27 23:34:31, ...
5 years, 8 months ago (2015-04-04 21:57:16 UTC) #29
davidben
Just some minor comments (note that some are attached to the previous patch set). The ...
5 years, 8 months ago (2015-04-07 19:22:25 UTC) #30
eroman
https://codereview.chromium.org/908863004/diff/480001/net/cert_net/cert_net_fetcher_impl.cc File net/cert_net/cert_net_fetcher_impl.cc (right): https://codereview.chromium.org/908863004/diff/480001/net/cert_net/cert_net_fetcher_impl.cc#newcode420 net/cert_net/cert_net_fetcher_impl.cc:420: requests_.erase(requests_.begin()); On 2015/04/07 19:22:25, David Benjamin wrote: > Probably ...
5 years, 8 months ago (2015-04-07 19:54:55 UTC) #31
eroman
https://codereview.chromium.org/908863004/diff/360001/net/cert_net/cert_net_fetcher_impl_unittest.cc File net/cert_net/cert_net_fetcher_impl_unittest.cc (right): https://codereview.chromium.org/908863004/diff/360001/net/cert_net/cert_net_fetcher_impl_unittest.cc#newcode153 net/cert_net/cert_net_fetcher_impl_unittest.cc:153: CertNetFetcher* fetcher) { On 2015/04/07 19:22:25, David Benjamin wrote: ...
5 years, 8 months ago (2015-04-07 20:22:40 UTC) #32
davidben
lgtm https://codereview.chromium.org/908863004/diff/480001/net/cert_net/cert_net_fetcher_impl.cc File net/cert_net/cert_net_fetcher_impl.cc (right): https://codereview.chromium.org/908863004/diff/480001/net/cert_net/cert_net_fetcher_impl.cc#newcode420 net/cert_net/cert_net_fetcher_impl.cc:420: requests_.erase(requests_.begin()); On 2015/04/07 20:22:40, eroman (sick slow) wrote: ...
5 years, 8 months ago (2015-04-07 21:22:39 UTC) #33
eroman
https://codereview.chromium.org/908863004/diff/480001/net/cert_net/cert_net_fetcher_impl.cc File net/cert_net/cert_net_fetcher_impl.cc (right): https://codereview.chromium.org/908863004/diff/480001/net/cert_net/cert_net_fetcher_impl.cc#newcode420 net/cert_net/cert_net_fetcher_impl.cc:420: requests_.erase(requests_.begin()); On 2015/04/07 21:22:39, David Benjamin wrote: > On ...
5 years, 8 months ago (2015-04-08 16:23:39 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/908863004/520001
5 years, 8 months ago (2015-04-08 16:26:03 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/55325)
5 years, 8 months ago (2015-04-08 16:36:08 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/908863004/540001
5 years, 8 months ago (2015-04-08 16:45:14 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/55336)
5 years, 8 months ago (2015-04-08 16:56:34 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/908863004/560001
5 years, 8 months ago (2015-04-08 17:09:53 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/908863004/560001
5 years, 8 months ago (2015-04-08 18:04:41 UTC) #50
commit-bot: I haz the power
Committed patchset #29 (id:560001)
5 years, 8 months ago (2015-04-08 18:54:19 UTC) #51
commit-bot: I haz the power
5 years, 8 months ago (2015-04-08 18:55:20 UTC) #52
Message was sent while issue was closed.
Patchset 29 (id:??) landed as
https://crrev.com/0fad62b76d552f09f8a1c90edce26fe64df9a7f9
Cr-Commit-Position: refs/heads/master@{#324261}

Powered by Google App Engine
This is Rietveld 408576698