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

Issue 2302913003: Add SafeBrowsingNavigationObserver to listen to navigation events (Closed)

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

Description

Add SafeBrowsingNavigationObserver to listen to navigation events happen on all frames. These navigation events can help safe browsing service identify suspicious downloads that intentionally hide their referrers and/or landing pages, and report these pieces of info to safe browsing backend. This CL only covers the observing part. More management code (e.g. periodically cleanup, actual reporting, etc) will come up shortly. BUG=639467 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/602009dfabda593406bfd7f5171e8c4183335bf5 Committed: https://crrev.com/1782326f8a2c81a58136a0475d83f6c1c11db38d Committed: https://crrev.com/53acce88363fb6a9ed54e991d17b203cfdf6326d Cr-Original-Original-Commit-Position: refs/heads/master@{#428865} Cr-Original-Commit-Position: refs/heads/master@{#429071} Cr-Commit-Position: refs/heads/master@{#429976}

Patch Set 1 #

Patch Set 2 : clean up test cases #

Patch Set 3 : nit in test #

Patch Set 4 : disable DownloadViaHTML5FileApi due to flackiness #

Total comments: 40

Patch Set 5 : address nparker@'s comment and rebase-update #

Patch Set 6 : nit in test #

Patch Set 7 : nit #

Patch Set 8 : milli seconds to seconds #

Patch Set 9 : nit #

Total comments: 54

Patch Set 10 : address creis@'s comments #

Patch Set 11 : nit #

Total comments: 47

Patch Set 12 : address creis's comments #

Total comments: 2

Patch Set 13 : add TODO #

Patch Set 14 : manually merge in 2336833002, and use the new source_render_process_id in RetargetingDetails #

Patch Set 15 : nit #

Total comments: 28

Patch Set 16 : address nparker's comments #

Patch Set 17 : fix compilation #

Total comments: 50

Patch Set 18 : address creis@ comments #

Total comments: 20

Patch Set 19 : address comments from creis@ and nparker@ #

Patch Set 20 : make all bots happy #

Total comments: 81

Patch Set 21 : address comments #

Patch Set 22 : nit #

Total comments: 10

Patch Set 23 : add server redirect browser test #

Total comments: 8

Patch Set 24 : nit #

Patch Set 25 : rebase, and fix flaky browser tests #

Total comments: 2

Patch Set 26 : 2nd attempt for flaky browser tests #

Patch Set 27 : refine comments and format #

Total comments: 18

Patch Set 28 : using StartWatchingNewWebContents() #

Total comments: 2

Patch Set 29 : resolve final nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1651 lines, -58 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/safe_browsing_navigation_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +114 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +234 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +777 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +120 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +169 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/safe_browsing_navigation_observer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +117 lines, -0 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 19 20 21 22 23 24 25 2 chunks +2 lines, -0 lines 0 comments Download
A chrome/test/data/safe_browsing/download_protection/navigation_observer/iframe.html View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/safe_browsing/download_protection/navigation_observer/iframe_retargeting.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/test/data/safe_browsing/download_protection/navigation_observer/navigation_observer_multi_frame_tests.html View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/test/data/safe_browsing/download_protection/navigation_observer/navigation_observer_tests.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 4 chunks +68 lines, -51 lines 0 comments Download
D chrome/test/data/safe_browsing/download_protection/navigation_observer/safe_page.html View 1 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 162 (103 generated)
Jialiu Lin
Hi nparker@, Finally, I got most of browser_test working. I wanna run it by you ...
4 years, 3 months ago (2016-09-02 01:58:33 UTC) #5
Nathan Parker
I haven't looked at tests yet, but overall structure seems reasonable to me. I cannot ...
4 years, 3 months ago (2016-09-03 00:21:35 UTC) #10
Jialiu Lin
Thanks, nparker@! All your comments are addressed now. +creis@, Sorry for this belated CL. It ...
4 years, 3 months ago (2016-09-07 00:42:41 UTC) #14
Charlie Reis
Thanks! FYI, I just got hit with a critical security bug (and two other large ...
4 years, 3 months ago (2016-09-07 23:28:22 UTC) #17
Jialiu Lin
On 2016/09/07 at 23:28:22, creis wrote: > Thanks! FYI, I just got hit with a ...
4 years, 3 months ago (2016-09-07 23:32:22 UTC) #18
Jialiu Lin
Hi creis@, Sorry for bothering you again. I know everybody is crasily busy with Perf ...
4 years, 3 months ago (2016-09-15 21:58:52 UTC) #19
Charlie Reis
On 2016/09/15 21:58:52, Jialiu Lin wrote: > Hi creis@, > Sorry for bothering you again. ...
4 years, 3 months ago (2016-09-15 22:24:45 UTC) #20
Charlie Reis
I've mainly reviewed safe_browsing_navigation_observer.{h,cc} so far. Thanks for digging in and getting started. Looks like ...
4 years, 3 months ago (2016-09-16 23:35:06 UTC) #21
Jialiu Lin
On 2016/09/16 23:35:06, Charlie Reis (slow) wrote: > I've mainly reviewed safe_browsing_navigation_observer.{h,cc} so far. Thanks ...
4 years, 3 months ago (2016-09-17 00:35:10 UTC) #22
Charlie Reis
On 2016/09/17 00:35:10, Jialiu Lin wrote: > On 2016/09/16 23:35:06, Charlie Reis (slow) wrote: > ...
4 years, 3 months ago (2016-09-19 16:28:41 UTC) #23
Jialiu Lin
Hi creis@, Thanks for your comments! Here are some major changes since last patch: (1) ...
4 years, 3 months ago (2016-09-22 21:30:29 UTC) #26
Charlie Reis
Thanks for the updates! I'm part of the way through another pass, but I think ...
4 years, 3 months ago (2016-09-23 23:14:13 UTC) #27
Jialiu Lin
Thanks, creis@! Please see my replies inline. https://codereview.chromium.org/2302913003/diff/220001/chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc File chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc (right): https://codereview.chromium.org/2302913003/diff/220001/chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc#newcode27 chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc:27: bool IsExpired(const ...
4 years, 2 months ago (2016-09-27 17:51:00 UTC) #30
Charlie Reis
Thanks. Some thoughts on in-page navigations and tracking source URLs below. It sounds like we ...
4 years, 2 months ago (2016-09-28 21:08:14 UTC) #31
Jialiu Lin
Thanks creis@! I'll send out a calendar invite to you, nasko@ and dcheng@ shortly, so ...
4 years, 2 months ago (2016-09-28 21:39:15 UTC) #32
Jialiu Lin
Hi creis@ and nparker@, Since RetargetingDetails now has the correct process source_render_process_id (crbug.com/649855), I wonder ...
4 years, 2 months ago (2016-10-11 18:01:04 UTC) #50
Nathan Parker
Yes, I agree, I think we should work on landing this CL so you can ...
4 years, 2 months ago (2016-10-14 23:52:49 UTC) #51
Jialiu Lin
Thanks, nparker! Comments addressed. https://codereview.chromium.org/2302913003/diff/400001/chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc File chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc (right): https://codereview.chromium.org/2302913003/diff/400001/chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc#newcode40 chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc:40: NavigationEvent::NavigationEvent(NavigationEvent&& nav_event) On 2016/10/14 23:52:49, ...
4 years, 2 months ago (2016-10-17 19:17:16 UTC) #54
Charlie Reis
Thanks for moving forward on this. I'm a bit unclear on whether you're intending to ...
4 years, 2 months ago (2016-10-17 23:54:04 UTC) #61
Jialiu Lin
Hi creis@, Thanks for your comments! Added TODOs in code to indicate source_url might not ...
4 years, 2 months ago (2016-10-18 19:06:06 UTC) #62
Charlie Reis
Thanks! A few quick comments, since I'm out an event today. On 2016/10/18 19:06:06, Jialiu ...
4 years, 2 months ago (2016-10-19 17:10:46 UTC) #63
Nathan Parker
From my point of view, LGTM, modulo these comments and whatever Charlie has. https://codereview.chromium.org/2302913003/diff/460001/chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc File ...
4 years, 2 months ago (2016-10-19 22:56:14 UTC) #64
Jialiu Lin
Thank both of you for your patient and thorough review! All your remaining comments are ...
4 years, 2 months ago (2016-10-21 02:38:39 UTC) #67
Jialiu Lin
Finally, all bots are happy now. Let me know if you have further comments. Thanks!
4 years, 2 months ago (2016-10-23 04:59:08 UTC) #82
Charlie Reis
Thanks! I think this is almost ready to go. The comments below are mostly nits ...
4 years, 1 month ago (2016-10-25 04:52:27 UTC) #83
Jialiu Lin
Thanks, creis@! These comments are super helpful! I'm currently working on a regression and will ...
4 years, 1 month ago (2016-10-25 17:35:10 UTC) #84
Jialiu Lin
Hi creis@, Thanks for your thorough review! I have addressed all your comments! Since the ...
4 years, 1 month ago (2016-10-27 02:15:21 UTC) #85
Charlie Reis
Thanks! I didn't get a chance to look at it today (stability sheriff and other ...
4 years, 1 month ago (2016-10-27 23:06:13 UTC) #86
Charlie Reis
Thanks! This seems good, with the known caveats we've discussed. LGTM with nits (and one ...
4 years, 1 month ago (2016-10-28 23:36:09 UTC) #87
Jialiu Lin
Server side redirect browser test added. Thank you so much creis@! I learnt a lot ...
4 years, 1 month ago (2016-10-29 00:45:34 UTC) #91
Charlie Reis
Great! Still LGTM, though it looks like a few of your changes didn't make it ...
4 years, 1 month ago (2016-10-31 16:56:46 UTC) #92
Jialiu Lin
Oops, you're right. There were changes not uploaded in the last patch. Fixed. Thanks! https://codereview.chromium.org/2302913003/diff/660001/chrome/browser/safe_browsing/safe_browsing_navigation_observer.h ...
4 years, 1 month ago (2016-10-31 17:29:28 UTC) #93
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/2302913003/680001
4 years, 1 month ago (2016-10-31 17:30:06 UTC) #96
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/97546)
4 years, 1 month ago (2016-10-31 17:57:09 UTC) #98
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/2302913003/680001
4 years, 1 month ago (2016-10-31 18:05:12 UTC) #100
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/97612)
4 years, 1 month ago (2016-10-31 18:46:41 UTC) #102
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/2302913003/680001
4 years, 1 month ago (2016-10-31 18:47:50 UTC) #104
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/97688)
4 years, 1 month ago (2016-10-31 19:33:09 UTC) #106
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/2302913003/680001
4 years, 1 month ago (2016-10-31 23:20:12 UTC) #108
commit-bot: I haz the power
Committed patchset #24 (id:680001)
4 years, 1 month ago (2016-10-31 23:38:06 UTC) #109
commit-bot: I haz the power
Patchset 24 (id:??) landed as https://crrev.com/602009dfabda593406bfd7f5171e8c4183335bf5 Cr-Commit-Position: refs/heads/master@{#428865}
4 years, 1 month ago (2016-10-31 23:40:11 UTC) #111
Nathan Parker
lgtm Congrats, and thanks for being patient on the other dependencies. This is a thorny ...
4 years, 1 month ago (2016-11-01 00:19:41 UTC) #112
kjellander_chromium
A revert of this CL (patchset #24 id:680001) has been created in https://codereview.chromium.org/2470743002/ by kjellander@chromium.org. ...
4 years, 1 month ago (2016-11-01 09:48:36 UTC) #113
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/2302913003/720001
4 years, 1 month ago (2016-11-01 19:26:05 UTC) #126
commit-bot: I haz the power
Committed patchset #25 (id:720001)
4 years, 1 month ago (2016-11-01 19:30:47 UTC) #128
commit-bot: I haz the power
Patchset 25 (id:??) landed as https://crrev.com/1782326f8a2c81a58136a0475d83f6c1c11db38d Cr-Commit-Position: refs/heads/master@{#429071}
4 years, 1 month ago (2016-11-01 19:57:31 UTC) #130
Charlie Reis
In the future, please have the diff reviewed before re-landing after a revert, or mention ...
4 years, 1 month ago (2016-11-01 20:00:59 UTC) #131
Jialiu Lin
Sorry, I forgot to TBR. I'm actually not sure if this one will stick. I ...
4 years, 1 month ago (2016-11-01 20:29:14 UTC) #132
Avi (use Gerrit)
A revert of this CL (patchset #25 id:720001) has been created in https://codereview.chromium.org/2471623002/ by avi@chromium.org. ...
4 years, 1 month ago (2016-11-01 20:44:16 UTC) #133
Charlie Reis
On 2016/11/01 20:44:16, Avi wrote: > A revert of this CL (patchset #25 id:720001) has ...
4 years, 1 month ago (2016-11-01 20:50:56 UTC) #135
Jialiu Lin
Thanks for being patient with me. Please take a look at patch 26. I did ...
4 years, 1 month ago (2016-11-02 23:31:24 UTC) #143
Charlie Reis
Thanks for tracking down the flakiness. A few thoughts and suggestions below before we reland. ...
4 years, 1 month ago (2016-11-03 22:58:46 UTC) #144
Charlie Reis
https://codereview.chromium.org/2302913003/diff/780001/chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc File chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc (right): https://codereview.chromium.org/2302913003/diff/780001/chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc#newcode174 chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc:174: content::WaitForLoadStopWithoutSuccessCheck(new_tab_web_contents); On 2016/11/03 22:58:45, Charlie Reis wrote: > Hmm. ...
4 years, 1 month ago (2016-11-03 23:43:40 UTC) #145
Jialiu Lin
Thanks creis@. StartWatchingNewWebContents(..) is indeed the magical function that resolves all the problems. https://codereview.chromium.org/2302913003/diff/780001/chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc File ...
4 years, 1 month ago (2016-11-04 05:38:01 UTC) #151
Charlie Reis
Thanks-- I'm not sure all of the remaining changes are necessary, but I think they're ...
4 years, 1 month ago (2016-11-04 16:40:57 UTC) #154
Jialiu Lin
Thanks! https://codereview.chromium.org/2302913003/diff/820001/chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc File chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc (right): https://codereview.chromium.org/2302913003/diff/820001/chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc#newcode167 chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc:167: On 2016/11/04 16:40:57, Charlie Reis wrote: > nit: ...
4 years, 1 month ago (2016-11-04 17:52:36 UTC) #155
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/2302913003/840001
4 years, 1 month ago (2016-11-04 17:53:33 UTC) #158
commit-bot: I haz the power
Committed patchset #29 (id:840001)
4 years, 1 month ago (2016-11-04 19:29:29 UTC) #160
commit-bot: I haz the power
4 years, 1 month ago (2016-11-04 20:00:18 UTC) #162
Message was sent while issue was closed.
Patchset 29 (id:??) landed as
https://crrev.com/53acce88363fb6a9ed54e991d17b203cfdf6326d
Cr-Commit-Position: refs/heads/master@{#429976}

Powered by Google App Engine
This is Rietveld 408576698