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

Issue 2503243003: Wire up CertificateReportingService to handle report uploads (Closed)

Created:
4 years, 1 month ago by meacer
Modified:
3 years, 11 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, grt+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Wire up CertificateReportingService to handle report uploads This CL is a follow up to crrev.com/2543523002. It routes certificate reports through CertificateReportingService instead of SafeBrowsingPingManager. Reporting code in SafeBrowsingPingManager isn't removed yet. This is done in https://crrev.com/2578873003 Background: The main feature is to retry uploads of invalid SSL certificate reports. Currently, the reports are uploaded only once when the user sees an SSL error. This isn't always sufficient though, as the user might be behind a captive portal which blocks all connections to the internet. For that reason, this feature queues failed uploads and retries them at a later time. All of this logic is in CertificateReportingService. However, CertificateReportingService doesn't do any scheduling of retries itself, it relies on MetricsService instead. CertificateReportingServiceMetricsProvider retries queued (pending) report uploads whenever it's asked to provide metrics. This logic is very much like HttpsEngagementMetricsProvider which also relies on the metrics service to do the scheduling. BUG=554323 TEST=CertificateReportingServiceBrowserTest.* Committed: https://crrev.com/f43117a3430e9ec23d2d2329175257fa4d6059f0 Cr-Commit-Position: refs/heads/master@{#440788}

Patch Set 1 #

Patch Set 2 : Move cert reporting service to safebrowsing #

Patch Set 3 : CertificateReportingService unit tests #

Patch Set 4 : Rebase onto crrev/2543523002 #

Patch Set 5 : Lint2 #

Patch Set 6 : Rebase #

Patch Set 7 : Add missing file #

Patch Set 8 : Don't leak SafeBrowsingService in unit tests #

Patch Set 9 : Add histogram tests #

Patch Set 10 : Fix browser tests and histograms #

Patch Set 11 : Fix histogram unit tests #

Patch Set 12 : Rebase #

Total comments: 50

Patch Set 13 : jialiul, estark comments #

Total comments: 13

Patch Set 14 : estark comments and remove PreferenceObserver #

Patch Set 15 : Fix metrics provider - based on crrev.com/2531023002 #

Total comments: 6

Patch Set 16 : estark comments #

Total comments: 7

Patch Set 17 : More documentation for CertificateReportingMetricsProvider #

Total comments: 4

Patch Set 18 : isherman comments #

Patch Set 19 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1212 lines, -282 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +21 lines, -22 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_metrics_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +20 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +38 lines, -13 lines 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +44 lines, -31 lines 0 comments Download
A chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +676 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_service_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_service_factory.cc View 1 2 3 4 5 2 chunks +53 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +61 lines, -48 lines 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +60 lines, -102 lines 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 20 chunks +181 lines, -52 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager.cc View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +13 lines, -2 lines 0 comments Download
M chrome/test/BUILD.gn 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
M components/certificate_reporting/error_reporter.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 85 (62 generated)
meacer
estark, jialiul: PTAL? Thanks!
4 years ago (2016-12-15 22:12:18 UTC) #38
Jialiu Lin
Some initial comments. I haven't looked at tests very carefully. https://codereview.chromium.org/2503243003/diff/220001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc File chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc (right): https://codereview.chromium.org/2503243003/diff/220001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc#newcode24 ...
4 years ago (2016-12-16 01:55:24 UTC) #42
estark
Looks good, some nits and suggestions for test refactoring and questions. I focused on the ...
4 years ago (2016-12-16 01:57:59 UTC) #43
meacer
https://codereview.chromium.org/2503243003/diff/220001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2503243003/diff/220001/chrome/browser/chrome_content_browser_client.cc#newcode77 chrome/browser/chrome_content_browser_client.cc:77: #include "chrome/browser/safe_browsing/safe_browsing_service.h" On 2016/12/16 01:57:58, estark wrote: > can ...
4 years ago (2016-12-16 20:26:37 UTC) #45
estark
https://codereview.chromium.org/2503243003/diff/220001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2503243003/diff/220001/chrome/browser/chrome_content_browser_client.cc#newcode676 chrome/browser/chrome_content_browser_client.cc:676: class CertificateReportingServiceCertReporter : public SSLCertReporter { On 2016/12/16 20:26:35, ...
4 years ago (2016-12-16 23:39:04 UTC) #49
Jialiu Lin
no more comments from me. I'll defer to estark@. LGTM https://codereview.chromium.org/2503243003/diff/220001/chrome/browser/safe_browsing/certificate_reporting_service.cc File chrome/browser/safe_browsing/certificate_reporting_service.cc (right): https://codereview.chromium.org/2503243003/diff/220001/chrome/browser/safe_browsing/certificate_reporting_service.cc#newcode62 ...
4 years ago (2016-12-17 01:14:21 UTC) #50
meacer
Thanks Jialiu. Some quick comments with no changes yet. https://codereview.chromium.org/2503243003/diff/240001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc File chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc (right): https://codereview.chromium.org/2503243003/diff/240001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc#newcode22 chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc:22: ...
4 years ago (2016-12-17 01:23:21 UTC) #51
meacer
https://codereview.chromium.org/2503243003/diff/240001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2503243003/diff/240001/chrome/browser/chrome_content_browser_client.cc#newcode688 chrome/browser/chrome_content_browser_client.cc:688: CertificateReportingService* service_; On 2016/12/16 23:39:04, estark wrote: > nit: ...
4 years ago (2016-12-19 23:16:45 UTC) #52
meacer
estark: PTAL? https://codereview.chromium.org/2503243003/diff/240001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc File chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc (right): https://codereview.chromium.org/2503243003/diff/240001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc#newcode22 chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc:22: CertificateReportingServiceFactory::GetForBrowserContext( On 2016/12/17 01:23:21, Mustafa Emre Acer ...
4 years ago (2016-12-21 23:11:05 UTC) #58
estark
lgtm, just a few comment nits! https://codereview.chromium.org/2503243003/diff/240001/chrome/browser/safe_browsing/safe_browsing_service.h File chrome/browser/safe_browsing/safe_browsing_service.h (right): https://codereview.chromium.org/2503243003/diff/240001/chrome/browser/safe_browsing/safe_browsing_service.h#newcode124 chrome/browser/safe_browsing/safe_browsing_service.h:124: scoped_refptr<net::URLRequestContextGetter> url_request_context(); On ...
4 years ago (2016-12-22 00:11:44 UTC) #60
meacer
Thanks! isherman: Can you PTAL at chrome/browser/metrics/chrome_metrics_service_client.cc ? anthonyvd: Can you PTAL at chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc ? ...
4 years ago (2016-12-22 00:46:26 UTC) #64
Ilya Sherman
I might be missing some context for this CL. Could you please fill me in ...
4 years ago (2016-12-22 01:41:57 UTC) #65
anthonyvd
c/b/profiles/ lgtm
4 years ago (2016-12-22 18:06:33 UTC) #66
meacer
https://codereview.chromium.org/2503243003/diff/290018/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc File chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc (right): https://codereview.chromium.org/2503243003/diff/290018/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc#newcode32 chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc:32: service->SendPending(); On 2016/12/22 01:41:57, Ilya Sherman (Away De.29-Ja.4) wrote: ...
4 years ago (2016-12-22 18:50:04 UTC) #68
Ilya Sherman
https://codereview.chromium.org/2503243003/diff/290018/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc File chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc (right): https://codereview.chromium.org/2503243003/diff/290018/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc#newcode32 chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc:32: service->SendPending(); On 2016/12/22 18:50:04, Mustafa Emre Acer wrote: > ...
4 years ago (2016-12-22 22:00:09 UTC) #69
meacer
https://codereview.chromium.org/2503243003/diff/290018/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc File chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc (right): https://codereview.chromium.org/2503243003/diff/290018/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc#newcode32 chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc:32: service->SendPending(); On 2016/12/22 22:00:08, Ilya Sherman (Away De.29-Ja.4) wrote: ...
4 years ago (2016-12-22 22:23:36 UTC) #70
Ilya Sherman
Metrics changes LGTM, thanks. https://codereview.chromium.org/2503243003/diff/310001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc File chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc (right): https://codereview.chromium.org/2503243003/diff/310001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc#newcode19 chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc:19: // metrisc to the metrics ...
4 years ago (2016-12-23 00:56:48 UTC) #71
meacer
Thanks everyone! https://codereview.chromium.org/2503243003/diff/310001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc File chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc (right): https://codereview.chromium.org/2503243003/diff/310001/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc#newcode19 chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc:19: // metrisc to the metrics service. It ...
3 years, 12 months ago (2016-12-27 18:56:43 UTC) #72
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2503243003/330001
3 years, 12 months ago (2016-12-27 18:57:01 UTC) #75
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/128219) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 12 months ago (2016-12-27 18:58:45 UTC) #77
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2503243003/350001
3 years, 12 months ago (2016-12-27 19:34:49 UTC) #80
commit-bot: I haz the power
Committed patchset #19 (id:350001)
3 years, 12 months ago (2016-12-27 21:03:04 UTC) #83
commit-bot: I haz the power
3 years, 11 months ago (2017-01-02 15:47:14 UTC) #85
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/f43117a3430e9ec23d2d2329175257fa4d6059f0
Cr-Commit-Position: refs/heads/master@{#440788}

Powered by Google App Engine
This is Rietveld 408576698