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

Issue 1117173004: Split cert reporter class into report building/serializing and sending (Closed)

Created:
5 years, 7 months ago by estark
Modified:
5 years, 7 months ago
CC:
chromium-reviews, grt+watch_chromium.org, cbentzel+watch_chromium.org, stevenjb+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org, davidben, nharper
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Split cert reporter class into report building/serializing and sending The pre-existing |CertificateErrorReporter| class (in //chrome/browser/net) is now only in charge of sending reports over the network. A new class (|CertificateErrorReport| in //chrome/browser/ssl) is in charge of building and serializing the reports. The motivation for this change is to allow reports to include interstitial-specific information (such as the type of interstitial that was shown, whether the user clicked through, etc.). So as to avoid introducing interstitial knowledge into //c/b/net, all the report building and serializing knowledge (including the report protobuf) has been moved into //c/b/ssl. |SSLBlockingPage| now sends a serialized report through |ChromeContentBrowserClient| to the SafeBrowsing UIManager to be sent over the network. |ChromeFraudulentCertificateReporter| (responsible for reporting Google-property pinning violations) has also been moved into //c/b/ssl so that it can use the new |CertificateErrorReport| class to build reports before sending them with a |CertificateErrorReporter|. BUG=462713, 461588 Committed: https://crrev.com/4282f117db4ddb6b307efad849ec6635095e9cd1 Cr-Commit-Position: refs/heads/master@{#329723}

Patch Set 1 #

Patch Set 2 : BUILD.gn fix #

Total comments: 23

Patch Set 3 : rebase #

Patch Set 4 : rebase again #

Patch Set 5 : eroman comments #

Total comments: 2

Patch Set 6 : document parse/serialize return value #

Total comments: 30

Patch Set 7 : rsleevi comments #

Patch Set 8 : error handling first #

Total comments: 4

Patch Set 9 : move //c/b/ssl classes into global namespace #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+455 lines, -717 lines) Patch
M chrome/browser/BUILD.gn View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/BUILD.gn View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/net/BUILD.gn View 1 chunk +3 lines, -3 lines 0 comments Download
D chrome/browser/net/cert_logger.proto View 1 2 3 1 chunk +0 lines, -93 lines 0 comments Download
M chrome/browser/net/certificate_error_reporter.h View 1 2 3 4 5 chunks +10 lines, -18 lines 0 comments Download
M chrome/browser/net/certificate_error_reporter.cc View 1 2 3 4 5 6 10 chunks +17 lines, -92 lines 0 comments Download
M chrome/browser/net/certificate_error_reporter_unittest.cc View 1 2 3 4 5 6 21 chunks +41 lines, -98 lines 0 comments Download
D chrome/browser/net/chrome_fraudulent_certificate_reporter.h View 1 chunk +0 lines, -46 lines 0 comments Download
D chrome/browser/net/chrome_fraudulent_certificate_reporter.cc View 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc View 1 chunk +0 lines, -195 lines 0 comments Download
A chrome/browser/net/encrypted_cert_logger.proto View 1 chunk +30 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/ui_manager.h View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/ui_manager.cc View 3 chunks +4 lines, -7 lines 0 comments Download
A + chrome/browser/ssl/BUILD.gn View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
A + chrome/browser/ssl/cert_logger.proto View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -36 lines 0 comments Download
A chrome/browser/ssl/certificate_error_report.h View 1 2 3 4 5 6 7 8 1 chunk +51 lines, -0 lines 3 comments Download
A chrome/browser/ssl/certificate_error_report.cc View 1 2 3 4 5 6 7 8 1 chunk +92 lines, -0 lines 0 comments Download
A chrome/browser/ssl/certificate_error_report_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +97 lines, -0 lines 0 comments Download
A + chrome/browser/ssl/chrome_fraudulent_certificate_reporter.h View 1 2 3 4 5 6 7 8 4 chunks +13 lines, -14 lines 0 comments Download
A + chrome/browser/ssl/chrome_fraudulent_certificate_reporter.cc View 1 2 3 4 5 6 7 8 3 chunks +17 lines, -11 lines 0 comments Download
A + chrome/browser/ssl/chrome_fraudulent_certificate_reporter_unittest.cc View 1 2 3 4 5 6 7 8 5 chunks +10 lines, -12 lines 0 comments Download
M chrome/browser/ssl/ssl_blocking_page.cc View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/ssl/ssl_browser_tests.cc View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/ssl/ssl_cert_reporter.h View 1 2 3 4 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 chunks +20 lines, -4 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 32 (6 generated)
estark
Ryan: this CL moves cert error report building/serializing into //c/b/ssl, and keeps report sending in ...
5 years, 7 months ago (2015-05-06 22:45:03 UTC) #2
Ryan Sleevi
I'm going to randomly make Eric's life difficult by asking him to take point on ...
5 years, 7 months ago (2015-05-06 23:03:39 UTC) #4
estark
Haha, ok. Sorry, Eric. :D Let me know if you'd like to chat more so ...
5 years, 7 months ago (2015-05-06 23:05:07 UTC) #5
eroman
Sure I can take a look. Not sure if I will get to it tonight ...
5 years, 7 months ago (2015-05-07 00:16:32 UTC) #6
estark
On 2015/05/07 00:16:32, eroman wrote: > Sure I can take a look. Not sure if ...
5 years, 7 months ago (2015-05-11 16:44:38 UTC) #7
eroman
mostly looks good just a couple comments. thanks for your patience :) https://codereview.chromium.org/1117173004/diff/20001/chrome/browser/net/certificate_error_reporter.cc File chrome/browser/net/certificate_error_reporter.cc ...
5 years, 7 months ago (2015-05-12 00:27:52 UTC) #8
estark
Thanks eroman. https://codereview.chromium.org/1117173004/diff/20001/chrome/browser/net/certificate_error_reporter.cc File chrome/browser/net/certificate_error_reporter.cc (right): https://codereview.chromium.org/1117173004/diff/20001/chrome/browser/net/certificate_error_reporter.cc#newcode121 chrome/browser/net/certificate_error_reporter.cc:121: if (upload_url_.SchemeIsCryptographic()) { On 2015/05/12 00:27:51, eroman ...
5 years, 7 months ago (2015-05-12 20:42:16 UTC) #9
eroman
lgtm https://codereview.chromium.org/1117173004/diff/80001/chrome/browser/ssl/certificate_error_report.h File chrome/browser/ssl/certificate_error_report.h (right): https://codereview.chromium.org/1117173004/diff/80001/chrome/browser/ssl/certificate_error_report.h#newcode40 chrome/browser/ssl/certificate_error_report.h:40: // Serializes the report. The output will be ...
5 years, 7 months ago (2015-05-12 23:24:47 UTC) #10
estark
Thanks eroman. rsleevi: would you like to take a look now? I could also ask ...
5 years, 7 months ago (2015-05-13 00:46:01 UTC) #11
Ryan Sleevi
https://codereview.chromium.org/1117173004/diff/100001/chrome/browser/net/certificate_error_reporter.cc File chrome/browser/net/certificate_error_reporter.cc (right): https://codereview.chromium.org/1117173004/diff/100001/chrome/browser/net/certificate_error_reporter.cc#newcode53 chrome/browser/net/certificate_error_reporter.cc:53: crypto::HKDF hkdf(std::string((char*)shared_secret, sizeof(shared_secret)), drive by: Gotta use C++ casts, ...
5 years, 7 months ago (2015-05-13 01:02:13 UTC) #12
estark
https://codereview.chromium.org/1117173004/diff/100001/chrome/browser/net/certificate_error_reporter.cc File chrome/browser/net/certificate_error_reporter.cc (right): https://codereview.chromium.org/1117173004/diff/100001/chrome/browser/net/certificate_error_reporter.cc#newcode53 chrome/browser/net/certificate_error_reporter.cc:53: crypto::HKDF hkdf(std::string((char*)shared_secret, sizeof(shared_secret)), On 2015/05/13 01:02:12, Ryan Sleevi wrote: ...
5 years, 7 months ago (2015-05-13 01:44:49 UTC) #13
Ryan Sleevi
lgtm https://codereview.chromium.org/1117173004/diff/100001/chrome/browser/net/certificate_error_reporter_unittest.cc File chrome/browser/net/certificate_error_reporter_unittest.cc (right): https://codereview.chromium.org/1117173004/diff/100001/chrome/browser/net/certificate_error_reporter_unittest.cc#newcode156 chrome/browser/net/certificate_error_reporter_unittest.cc:156: CheckUploadData(request, &expect_reports_, expect_request_encrypted_, On 2015/05/13 01:44:49, estark wrote: ...
5 years, 7 months ago (2015-05-13 02:07:55 UTC) #14
estark
Thanks rsleevi. mattm: can you please take a look at changes in //chrome/browser/safe_browsing? mmenke: can ...
5 years, 7 months ago (2015-05-13 04:13:42 UTC) #16
estark
sky: can you please look at the BUILD.gn files?
5 years, 7 months ago (2015-05-13 04:15:36 UTC) #18
mmenke
profiles/ LGTM https://codereview.chromium.org/1117173004/diff/140001/chrome/browser/ssl/certificate_error_report.h File chrome/browser/ssl/certificate_error_report.h (right): https://codereview.chromium.org/1117173004/diff/140001/chrome/browser/ssl/certificate_error_report.h#newcode16 chrome/browser/ssl/certificate_error_report.h:16: namespace chrome_browser_ssl { I defer to others, ...
5 years, 7 months ago (2015-05-13 15:02:05 UTC) #19
sky
LGTM
5 years, 7 months ago (2015-05-13 15:52:47 UTC) #20
mattm
safe_browsing lgtm
5 years, 7 months ago (2015-05-13 17:35:55 UTC) #21
estark
Thanks all! Does anyone have a strong opinion on the issue mmenke raised? (That is, ...
5 years, 7 months ago (2015-05-13 17:40:38 UTC) #22
mmenke
https://codereview.chromium.org/1117173004/diff/140001/chrome/browser/ssl/certificate_error_report.h File chrome/browser/ssl/certificate_error_report.h (right): https://codereview.chromium.org/1117173004/diff/140001/chrome/browser/ssl/certificate_error_report.h#newcode16 chrome/browser/ssl/certificate_error_report.h:16: namespace chrome_browser_ssl { On 2015/05/13 17:40:38, estark wrote: > ...
5 years, 7 months ago (2015-05-13 18:03:01 UTC) #23
estark
https://codereview.chromium.org/1117173004/diff/140001/chrome/browser/ssl/certificate_error_report.h File chrome/browser/ssl/certificate_error_report.h (right): https://codereview.chromium.org/1117173004/diff/140001/chrome/browser/ssl/certificate_error_report.h#newcode16 chrome/browser/ssl/certificate_error_report.h:16: namespace chrome_browser_ssl { On 2015/05/13 18:03:01, mmenke wrote: > ...
5 years, 7 months ago (2015-05-13 20:38:43 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1117173004/160001
5 years, 7 months ago (2015-05-13 20:40:24 UTC) #27
mmenke
https://codereview.chromium.org/1117173004/diff/160001/chrome/browser/ssl/certificate_error_report.h File chrome/browser/ssl/certificate_error_report.h (right): https://codereview.chromium.org/1117173004/diff/160001/chrome/browser/ssl/certificate_error_report.h#newcode20 chrome/browser/ssl/certificate_error_report.h:20: // chrome_browser_net::CertificateErrorReporter. nit: --chrome_browser_net::
5 years, 7 months ago (2015-05-13 20:40:26 UTC) #28
estark
https://codereview.chromium.org/1117173004/diff/160001/chrome/browser/ssl/certificate_error_report.h File chrome/browser/ssl/certificate_error_report.h (right): https://codereview.chromium.org/1117173004/diff/160001/chrome/browser/ssl/certificate_error_report.h#newcode20 chrome/browser/ssl/certificate_error_report.h:20: // chrome_browser_net::CertificateErrorReporter. On 2015/05/13 20:40:26, mmenke wrote: > nit: ...
5 years, 7 months ago (2015-05-13 20:42:13 UTC) #29
mmenke
https://codereview.chromium.org/1117173004/diff/160001/chrome/browser/ssl/certificate_error_report.h File chrome/browser/ssl/certificate_error_report.h (right): https://codereview.chromium.org/1117173004/diff/160001/chrome/browser/ssl/certificate_error_report.h#newcode20 chrome/browser/ssl/certificate_error_report.h:20: // chrome_browser_net::CertificateErrorReporter. On 2015/05/13 20:42:13, estark wrote: > On ...
5 years, 7 months ago (2015-05-13 20:44:22 UTC) #30
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 7 months ago (2015-05-13 22:02:05 UTC) #31
commit-bot: I haz the power
5 years, 7 months ago (2015-05-13 22:03:35 UTC) #32
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/4282f117db4ddb6b307efad849ec6635095e9cd1
Cr-Commit-Position: refs/heads/master@{#329723}

Powered by Google App Engine
This is Rietveld 408576698