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

Issue 2029903002: Add token field to ClientSafeBrowsingReportReqeust (Closed)

Created:
4 years, 6 months ago by Jialiu Lin
Modified:
4 years, 6 months ago
Reviewers:
asanka, Nathan Parker, sky
CC:
asanka, chromium-reviews, darin-cc_chromium.org, grt+watch_chromium.org, gunaa_chroium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add token field to ClientSafeBrowsingReportReqeust. In order to calculate CTRs of bad downloads, safe browsing needs information to link ClientSafeBrowsingReportRequest (for downloads) and ClientDownloadResponse. To achieve this, we add a token field to identify its corresponding ClientDownloadResponse in the ClientSafeBrowsingReportRequest, and propagate it with the same string in ClientDownloadResponse.token. Also add a new download report type (DANGEROUS_DOWNLOAD_BY_API) to separately track CTR of dangerous downloads go through download API. BUG=615511 Committed: https://crrev.com/2c26385851a2425cb68a47da7f420c04e28b6c45 Cr-Commit-Position: refs/heads/master@{#398699}

Patch Set 1 #

Patch Set 2 : add/fix tests #

Patch Set 3 : separate download recovery and download confirmation (by download api) #

Patch Set 4 : tweak comments #

Total comments: 2

Patch Set 5 : re-write using GetUserData/SetUserData #

Total comments: 10

Patch Set 6 : address nparker's comments #

Patch Set 7 : nit in test #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -30 lines) Patch
M chrome/browser/download/download_commands.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/download/download_danger_prompt.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/download/download_danger_prompt.cc View 1 2 3 4 3 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/download/download_danger_prompt_browsertest.cc View 1 2 3 4 11 chunks +83 lines, -17 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service.h View 1 2 3 4 5 chunks +27 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service.cc View 1 2 3 4 5 4 chunks +27 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service_unittest.cc View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_danger_prompt_impl.cc View 1 2 3 4 4 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/ui/views/download/download_danger_prompt_views.cc View 1 2 3 4 3 chunks +10 lines, -2 lines 2 comments Download
M chrome/common/safe_browsing/csd.proto View 1 2 3 4 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (13 generated)
Jialiu Lin
Hi asanka@, This is requested by bineval team for linking ClientDownloadResponse to ClientSafeBrowsingReportRequest in order ...
4 years, 6 months ago (2016-06-03 20:56:09 UTC) #9
asanka
Sorry about the delay. A good rule of thumb for this sort of change is ...
4 years, 6 months ago (2016-06-06 20:39:27 UTC) #10
Jialiu Lin
On 2016/06/06 at 20:39:27, asanka wrote: Ah, Thanks for pointing me to GetUserData/SetUserData. I wish ...
4 years, 6 months ago (2016-06-07 18:35:58 UTC) #12
asanka
lgtm https://codereview.chromium.org/2029903002/diff/180001/chrome/browser/safe_browsing/download_protection_service.cc File chrome/browser/safe_browsing/download_protection_service.cc (right): https://codereview.chromium.org/2029903002/diff/180001/chrome/browser/safe_browsing/download_protection_service.cc#newcode86 chrome/browser/safe_browsing/download_protection_service.cc:86: = &kDownloadPingTokenKey; Interesting. Have you seen this pattern ...
4 years, 6 months ago (2016-06-07 20:26:44 UTC) #13
Jialiu Lin
Thanks, asanka@! https://codereview.chromium.org/2029903002/diff/140001/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): https://codereview.chromium.org/2029903002/diff/140001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode337 chrome/browser/download/chrome_download_manager_delegate.cc:337: base::EmptyString()); On 2016/06/06 at 20:39:27, asanka wrote: ...
4 years, 6 months ago (2016-06-07 20:34:01 UTC) #14
Jialiu Lin
+sky@ for owner review of chrome/browser/ui/cocoa/download/download_danger_prompt_impl.cc, chrome/browser/ui/views/download/download_danger_prompt_view.cc +nparker@ for safe_browsing related owner review. Thanks!
4 years, 6 months ago (2016-06-07 20:37:47 UTC) #16
Nathan Parker
lgtm for safe_browsing, with some nits https://codereview.chromium.org/2029903002/diff/180001/chrome/browser/safe_browsing/download_protection_service.cc File chrome/browser/safe_browsing/download_protection_service.cc (right): https://codereview.chromium.org/2029903002/diff/180001/chrome/browser/safe_browsing/download_protection_service.cc#newcode86 chrome/browser/safe_browsing/download_protection_service.cc:86: = &kDownloadPingTokenKey; On ...
4 years, 6 months ago (2016-06-07 23:00:54 UTC) #17
Jialiu Lin
Thanks, nparker@! Your comments are all addressed. https://codereview.chromium.org/2029903002/diff/180001/chrome/browser/safe_browsing/download_protection_service.cc File chrome/browser/safe_browsing/download_protection_service.cc (right): https://codereview.chromium.org/2029903002/diff/180001/chrome/browser/safe_browsing/download_protection_service.cc#newcode86 chrome/browser/safe_browsing/download_protection_service.cc:86: = &kDownloadPingTokenKey; ...
4 years, 6 months ago (2016-06-08 00:06:16 UTC) #18
sky
https://codereview.chromium.org/2029903002/diff/220001/chrome/browser/ui/views/download/download_danger_prompt_views.cc File chrome/browser/ui/views/download/download_danger_prompt_views.cc (right): https://codereview.chromium.org/2029903002/diff/220001/chrome/browser/ui/views/download/download_danger_prompt_views.cc#newcode78 chrome/browser/ui/views/download/download_danger_prompt_views.cc:78: bool show_context_; Would it make more sense to have ...
4 years, 6 months ago (2016-06-08 16:12:18 UTC) #19
Jialiu Lin
Thanks, sky@! https://codereview.chromium.org/2029903002/diff/220001/chrome/browser/ui/views/download/download_danger_prompt_views.cc File chrome/browser/ui/views/download/download_danger_prompt_views.cc (right): https://codereview.chromium.org/2029903002/diff/220001/chrome/browser/ui/views/download/download_danger_prompt_views.cc#newcode78 chrome/browser/ui/views/download/download_danger_prompt_views.cc:78: bool show_context_; On 2016/06/08 16:12:17, sky wrote: ...
4 years, 6 months ago (2016-06-08 17:46:29 UTC) #20
sky
Ok, LGTM
4 years, 6 months ago (2016-06-08 20:11:05 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2029903002/220001
4 years, 6 months ago (2016-06-08 20:29:41 UTC) #24
commit-bot: I haz the power
Committed patchset #7 (id:220001)
4 years, 6 months ago (2016-06-08 22:18:26 UTC) #25
commit-bot: I haz the power
4 years, 6 months ago (2016-06-08 22:19:48 UTC) #27
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/2c26385851a2425cb68a47da7f420c04e28b6c45
Cr-Commit-Position: refs/heads/master@{#398699}

Powered by Google App Engine
This is Rietveld 408576698