New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 683299 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Download attribution should happen right after url checks

Project Member Reported by jialiul@chromium.org, Jan 20 2017

Issue description

Currently, download attribution happens right before ClientDownloadRequest is sent.
Unfortunately, if the target takes more than 2 minutes to download, by the time we try to get its referrer information, it has already been cleared by the periodic cleanup.

So, we should do the download attribution much earlier. 
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/20d16215e1bd867da6a23887046f4d6894222c00

commit 20d16215e1bd867da6a23887046f4d6894222c00
Author: jialiul <jialiul@chromium.org>
Date: Fri Jan 27 20:51:40 2017

Since SafeBrowsingNavigationObserverManager cleans up navigation
events every two minutes, if downloading a file takes more than 2
minutes, we'll get nothing from the attribution logic.
Therefore, this CL moves the download attribution logic to
after download url checking (before download starts).

This CL also changes the way of how referrer chain is constructed.
Instead of putting referrer entries in a temporary vector, I put
them directly into a RepeatedPtrField<ReferrerChainEntry> to avoid
extra copying/moving operations. This should mitigate the out-of
-memory issue.

BUG= 683299 ,676675

Review-Url: https://codereview.chromium.org/2647323004
Cr-Commit-Position: refs/heads/master@{#446761}

[modify] https://crrev.com/20d16215e1bd867da6a23887046f4d6894222c00/chrome/browser/download/chrome_download_manager_delegate.cc
[modify] https://crrev.com/20d16215e1bd867da6a23887046f4d6894222c00/chrome/browser/safe_browsing/download_protection_service.cc
[modify] https://crrev.com/20d16215e1bd867da6a23887046f4d6894222c00/chrome/browser/safe_browsing/download_protection_service.h
[modify] https://crrev.com/20d16215e1bd867da6a23887046f4d6894222c00/chrome/browser/safe_browsing/download_protection_service_unittest.cc
[modify] https://crrev.com/20d16215e1bd867da6a23887046f4d6894222c00/chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc
[modify] https://crrev.com/20d16215e1bd867da6a23887046f4d6894222c00/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
[modify] https://crrev.com/20d16215e1bd867da6a23887046f4d6894222c00/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h

Status: Fixed (was: Started)
Labels: Merge-Request-57
Project Member

Comment 4 by sheriffbot@chromium.org, Feb 7 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 8 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0d14f396060bdb6639dba6664ee77fe2f2e3e423

commit 0d14f396060bdb6639dba6664ee77fe2f2e3e423
Author: Jialiu Lin <jialiul@chromium.org>
Date: Wed Feb 08 01:44:34 2017

Since SafeBrowsingNavigationObserverManager cleans up navigation events every two minutes, if downloading a file takes more than 2 minutes, we'll get nothing from the attribution logic. Therefore, this CL moves the download attribution logic to after download url checking (before download starts).

This CL also changes the way of how referrer chain is constructed.
Instead of putting referrer entries in a temporary vector, I put
them directly into a RepeatedPtrField<ReferrerChainEntry> to avoid
extra copying/moving operations. This should mitigate the out-of
-memory issue.

BUG= 683299 ,676675

Review-Url: https://codereview.chromium.org/2647323004
Cr-Commit-Position: refs/heads/master@{#446761}
(cherry picked from commit 20d16215e1bd867da6a23887046f4d6894222c00)

Review-Url: https://codereview.chromium.org/2681783003 .
Cr-Commit-Position: refs/branch-heads/2987@{#375}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/0d14f396060bdb6639dba6664ee77fe2f2e3e423/chrome/browser/download/chrome_download_manager_delegate.cc
[modify] https://crrev.com/0d14f396060bdb6639dba6664ee77fe2f2e3e423/chrome/browser/safe_browsing/download_protection_service.cc
[modify] https://crrev.com/0d14f396060bdb6639dba6664ee77fe2f2e3e423/chrome/browser/safe_browsing/download_protection_service.h
[modify] https://crrev.com/0d14f396060bdb6639dba6664ee77fe2f2e3e423/chrome/browser/safe_browsing/download_protection_service_unittest.cc
[modify] https://crrev.com/0d14f396060bdb6639dba6664ee77fe2f2e3e423/chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc
[modify] https://crrev.com/0d14f396060bdb6639dba6664ee77fe2f2e3e423/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
[modify] https://crrev.com/0d14f396060bdb6639dba6664ee77fe2f2e3e423/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h

Sign in to add a comment