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

Issue 2648713002: Add response code to the success callback of ReportSender (Closed)

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

Description

Add response code to the success callback of ReportSender We are suspecting that some error reports don't get sent properly even when the success callback runs. For that reason, we'll check the response code and classify the upload as failure if the response code isn't as expected. BUG=682933 Review-Url: https://codereview.chromium.org/2648713002 Cr-Commit-Position: refs/heads/master@{#467772} Committed: https://chromium.googlesource.com/chromium/src/+/5d4dc5a9a8c92aef2ebda576be00795677b8d625

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rebase #

Patch Set 3 : Remove response code from error callback #

Total comments: 10

Patch Set 4 : Move http_response_code to error callback #

Total comments: 13

Patch Set 5 : eroman and estark comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -93 lines) Patch
M chrome/browser/safe_browsing/certificate_reporting_service.h View 1 2 3 4 1 chunk +8 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_service.cc View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/mock_permission_report_sender.h View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/safe_browsing/mock_permission_report_sender.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/safe_browsing/notification_image_reporter.cc View 1 2 3 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/safe_browsing/permission_reporter.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ssl/chrome_expect_ct_reporter.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download
M components/certificate_reporting/error_reporter.h View 1 2 3 4 1 chunk +9 lines, -1 line 0 comments Download
M components/certificate_reporting/error_reporter.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/certificate_reporting/error_reporter_unittest.cc View 1 2 3 4 7 chunks +21 lines, -13 lines 0 comments Download
M net/http/transport_security_state.h View 1 2 3 4 1 chunk +13 lines, -8 lines 0 comments Download
M net/http/transport_security_state.cc View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M net/http/transport_security_state_unittest.cc View 1 2 3 3 chunks +14 lines, -13 lines 0 comments Download
M net/url_request/report_sender.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M net/url_request/report_sender.cc View 1 2 3 4 2 chunks +9 lines, -4 lines 0 comments Download
M net/url_request/report_sender_unittest.cc View 1 2 3 4 11 chunks +91 lines, -14 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download

Messages

Total messages: 50 (26 generated)
meacer
PTAL? I'm not fully convinced that we need response_code for error callbacks - there will ...
3 years, 11 months ago (2017-01-20 02:10:38 UTC) #4
meacer
On 2017/01/20 02:10:38, Mustafa Emre Acer wrote: > PTAL? I'm not fully convinced that we ...
3 years, 11 months ago (2017-01-20 19:26:08 UTC) #7
Nathan Parker
The OnResponseStarted() interface says: // At this point, // meta data about the response is ...
3 years, 11 months ago (2017-01-23 23:42:37 UTC) #8
meacer
Okay, I'm now enlightened and convinced that we should do this. Will take another shot ...
3 years, 10 months ago (2017-02-02 02:07:32 UTC) #9
Nathan Parker
lgtm Thanks Mustafa https://codereview.chromium.org/2648713002/diff/1/chrome/browser/safe_browsing/certificate_reporting_service.cc File chrome/browser/safe_browsing/certificate_reporting_service.cc (right): https://codereview.chromium.org/2648713002/diff/1/chrome/browser/safe_browsing/certificate_reporting_service.cc#newcode149 chrome/browser/safe_browsing/certificate_reporting_service.cc:149: RecordUMAOnFailure(error); How about also logging the ...
3 years, 10 months ago (2017-02-07 01:33:01 UTC) #10
Nathan Parker
lgtm Is this CL going to land, or is it abandoned?
3 years, 8 months ago (2017-04-12 19:41:16 UTC) #11
meacer
On 2017/04/12 19:41:16, Nathan Parker wrote: > lgtm > > Is this CL going to ...
3 years, 8 months ago (2017-04-12 20:07:31 UTC) #12
meacer
eroman, estark: Can you PTAL? eroman: net/ estark: components/certificate_reporting/
3 years, 8 months ago (2017-04-25 18:10:01 UTC) #23
eroman
https://codereview.chromium.org/2648713002/diff/40001/chrome/browser/safe_browsing/certificate_reporting_service.h File chrome/browser/safe_browsing/certificate_reporting_service.h (right): https://codereview.chromium.org/2648713002/diff/40001/chrome/browser/safe_browsing/certificate_reporting_service.h#newcode130 chrome/browser/safe_browsing/certificate_reporting_service.h:130: void SuccessCallback(int report_id, int response_code); can you document what ...
3 years, 8 months ago (2017-04-25 21:02:39 UTC) #24
meacer
Adding two comments before I address the rest. https://codereview.chromium.org/2648713002/diff/40001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2648713002/diff/40001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode53 chrome/browser/safe_browsing/notification_image_reporter.cc:53: void ...
3 years, 8 months ago (2017-04-25 22:19:07 UTC) #25
eroman
https://codereview.chromium.org/2648713002/diff/40001/net/url_request/report_sender.h File net/url_request/report_sender.h (right): https://codereview.chromium.org/2648713002/diff/40001/net/url_request/report_sender.h#newcode33 net/url_request/report_sender.h:33: using SuccessCallback = base::Callback<void(int /* response_code */)>; On 2017/04/25 ...
3 years, 8 months ago (2017-04-25 22:41:55 UTC) #26
meacer
https://codereview.chromium.org/2648713002/diff/40001/net/url_request/report_sender.h File net/url_request/report_sender.h (right): https://codereview.chromium.org/2648713002/diff/40001/net/url_request/report_sender.h#newcode33 net/url_request/report_sender.h:33: using SuccessCallback = base::Callback<void(int /* response_code */)>; On 2017/04/25 ...
3 years, 8 months ago (2017-04-25 22:54:54 UTC) #27
eroman
My proposal was to change the signature for ErrorCallback by adding a third parameter: (url, ...
3 years, 8 months ago (2017-04-25 23:02:50 UTC) #28
meacer
On 2017/04/25 23:02:50, eroman wrote: > My proposal was to change the signature for ErrorCallback ...
3 years, 8 months ago (2017-04-25 23:06:49 UTC) #29
meacer
Addressed comments. Can you please take another look? https://codereview.chromium.org/2648713002/diff/40001/chrome/browser/safe_browsing/certificate_reporting_service.h File chrome/browser/safe_browsing/certificate_reporting_service.h (right): https://codereview.chromium.org/2648713002/diff/40001/chrome/browser/safe_browsing/certificate_reporting_service.h#newcode130 chrome/browser/safe_browsing/certificate_reporting_service.h:130: void ...
3 years, 8 months ago (2017-04-26 22:27:06 UTC) #34
eroman
lgtm! https://codereview.chromium.org/2648713002/diff/60001/chrome/browser/safe_browsing/certificate_reporting_service.cc File chrome/browser/safe_browsing/certificate_reporting_service.cc (right): https://codereview.chromium.org/2648713002/diff/60001/chrome/browser/safe_browsing/certificate_reporting_service.cc#newcode158 chrome/browser/safe_browsing/certificate_reporting_service.cc:158: int error, ditto https://codereview.chromium.org/2648713002/diff/60001/chrome/browser/safe_browsing/certificate_reporting_service.h File chrome/browser/safe_browsing/certificate_reporting_service.h (right): https://codereview.chromium.org/2648713002/diff/60001/chrome/browser/safe_browsing/certificate_reporting_service.h#newcode131 ...
3 years, 8 months ago (2017-04-26 22:52:28 UTC) #35
estark
https://codereview.chromium.org/2648713002/diff/60001/components/certificate_reporting/error_reporter.h File components/certificate_reporting/error_reporter.h (right): https://codereview.chromium.org/2648713002/diff/60001/components/certificate_reporting/error_reporter.h#newcode63 components/certificate_reporting/error_reporter.h:63: virtual void SendExtendedReportingReport( nit: can you document what the ...
3 years, 8 months ago (2017-04-27 00:35:58 UTC) #36
meacer
https://codereview.chromium.org/2648713002/diff/60001/chrome/browser/safe_browsing/certificate_reporting_service.cc File chrome/browser/safe_browsing/certificate_reporting_service.cc (right): https://codereview.chromium.org/2648713002/diff/60001/chrome/browser/safe_browsing/certificate_reporting_service.cc#newcode158 chrome/browser/safe_browsing/certificate_reporting_service.cc:158: int error, On 2017/04/26 22:52:28, eroman wrote: > ditto ...
3 years, 8 months ago (2017-04-27 00:56:42 UTC) #37
estark
components/certificate_reporting lgtm
3 years, 8 months ago (2017-04-27 01:06:50 UTC) #38
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/2648713002/80001
3 years, 7 months ago (2017-04-27 17:33:35 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/440803)
3 years, 7 months ago (2017-04-27 18:00:36 UTC) #43
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/2648713002/80001
3 years, 7 months ago (2017-04-27 19:02:28 UTC) #45
robbybrewer49
3 years, 7 months ago (2017-04-27 19:08:43 UTC) #47
commit-bot: I haz the power
3 years, 7 months ago (2017-04-27 20:38:00 UTC) #50
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/5d4dc5a9a8c92aef2ebda576be00...

Powered by Google App Engine
This is Rietveld 408576698