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

Issue 2612663002: Use main frame URL to identify referrer if sub-frame url is not available (Closed)

Created:
3 years, 11 months ago by Jialiu Lin
Modified:
3 years, 11 months ago
Reviewers:
Nathan Parker
CC:
chromium-reviews, grt+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

In identifying download referrer chain, if the subframe url is not available (e.g. empty), we should use main frame url to search for previous navigation. This will help us correctly identify referrer of downloads that happen in sub-frame. For example, page A has a link to page B, and page B has a subframe C, and subframe C links to download D. A ---> B \iframe C -----> D If we only look at the frame D's in, we can only reach C in attribution. But in fact it should be D-C-B-A. BUG=639467 Committed: https://crrev.com/f5e07b74bfbc8bf109bdf9855b0a6c0214085d73 Cr-Commit-Position: refs/heads/master@{#441454}

Patch Set 1 #

Total comments: 4

Patch Set 2 : address comments from nparker@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -23 lines) Patch
M chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc View 8 chunks +39 lines, -13 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h View 1 3 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc View 1 5 chunks +21 lines, -5 lines 0 comments Download
M chrome/test/data/safe_browsing/download_protection/navigation_observer/navigation_observer_tests.html View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (14 generated)
Jialiu Lin
Hi nparker@, PTAL. Thanks!
3 years, 11 months ago (2017-01-04 01:53:45 UTC) #10
Nathan Parker
lgtm https://codereview.chromium.org/2612663002/diff/1/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc File chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc (right): https://codereview.chromium.org/2612663002/diff/1/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc#newcode361 chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc:361: GURL search_url = target_url.is_empty() ? target_main_frame_url : target_url; ...
3 years, 11 months ago (2017-01-04 18:54:51 UTC) #11
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/2612663002/20001
3 years, 11 months ago (2017-01-04 19:34:07 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
3 years, 11 months ago (2017-01-04 20:38:08 UTC) #17
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/f5e07b74bfbc8bf109bdf9855b0a6c0214085d73 Cr-Commit-Position: refs/heads/master@{#441454}
3 years, 11 months ago (2017-01-04 20:40:29 UTC) #19
Jialiu Lin
3 years, 11 months ago (2017-01-04 21:47:01 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/2612663002/diff/1/chrome/browser/safe_browsin...
File chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
(right):

https://codereview.chromium.org/2612663002/diff/1/chrome/browser/safe_browsin...
chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc:361:
GURL search_url = target_url.is_empty() ? target_main_frame_url : target_url;
On 2017/01/04 18:54:51, Nathan Parker wrote:
> nit: could be 
> const GURL&
> so you don't make a copy.

Done.

https://codereview.chromium.org/2612663002/diff/1/chrome/browser/safe_browsin...
File chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h
(right):

https://codereview.chromium.org/2612663002/diff/1/chrome/browser/safe_browsin...
chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h:159:
const GURL& target_main_frame_url,
On 2017/01/04 18:54:51, Nathan Parker wrote:
> Mention this new arg in the comments

Done.

Powered by Google App Engine
This is Rietveld 408576698