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

Issue 2022783002: Skeleton of the Safe Browsing Subresource Filter. (Closed)

Created:
4 years, 6 months ago by engedy
Modified:
4 years, 6 months ago
CC:
noƩ, Nathan Parker
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Skeleton of the Safe Browsing Subresource Filter. This CL lays down the foundation for future work on the subresource filter component. See the 'intent to implement' posted to security-dev@, under the title "Extend Safe Browsing protection to embedded sub-resources". In response to finding that many users proceed through Safe Browsing warning interstitials that are displayed when the site ahead contains deceptive embedded content, we would like provide another layer of protection for these users. After the interstitial has been shown, clicked through and when the actual content on the page is loaded, this component will be used to filter network requests for some embedded sub-resources on these sites. This CL concerns itself merely with adding the skeleton of the architecture, plus a mock filter to be used in browsertests that disallows all subresource loads. The component is disabled and has no effect in production code. BUG=609747 TBR=tsepez@chromium.org Committed: https://crrev.com/9ae0424e95a8fff9a97adfd0845759bd87b0e129 Cr-Commit-Position: refs/heads/master@{#398534}

Patch Set 1 #

Total comments: 34

Patch Set 2 : Addressed comments from battre@. #

Total comments: 33

Patch Set 3 : Addressed most comments. #

Patch Set 4 : Remove unused test data. #

Patch Set 5 : Rebase. #

Total comments: 12

Patch Set 6 : Fix FrameFetchContext.cpp after rebase. #

Patch Set 7 : Addressed comments in tests. #

Patch Set 8 : Clean up relative URLs. #

Patch Set 9 : Add missing resources. #

Patch Set 10 : Rebase. #

Total comments: 1

Patch Set 11 : Rebase. Again. #

Patch Set 12 : Fix whitespace errors. #

Patch Set 13 : Add OWNERS for IPC, and pacify GN and iOS builds. #

Patch Set 14 : Correct filenames in OWNERS file. #

Patch Set 15 : Implement RenderFrameObserver::OnDestruct introduced by rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1396 lines, -57 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -0 lines 0 comments Download
A chrome/browser/subresource_filter/DEPS View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/browser/subresource_filter/subresource_filter_browsertest.cc View 1 chunk +80 lines, -0 lines 0 comments Download
M chrome/browser/ui/tab_helpers.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/renderer/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/test/data/subresource_filter/frame_set.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/subresource_filter/frame_with_included_script.html View 1 chunk +5 lines, -0 lines 0 comments Download
A + chrome/test/data/subresource_filter/included_script.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M components/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M components/OWNERS View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M components/components.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -0 lines 0 comments Download
A components/subresource_filter.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +130 lines, -0 lines 0 comments Download
A components/subresource_filter/DEPS View 1 chunk +6 lines, -0 lines 0 comments Download
A + components/subresource_filter/OWNERS View 1 chunk +1 line, -0 lines 0 comments Download
A + components/subresource_filter/PRESUBMIT.py View 1 chunk +2 lines, -2 lines 0 comments Download
A components/subresource_filter/README View 1 1 chunk +4 lines, -0 lines 0 comments Download
A + components/subresource_filter/content/DEPS View 1 chunk +2 lines, -4 lines 0 comments Download
A components/subresource_filter/content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +21 lines, -0 lines 0 comments Download
A + components/subresource_filter/content/browser/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -4 lines 0 comments Download
A components/subresource_filter/content/browser/content_subresource_filter_driver.h View 1 1 chunk +38 lines, -0 lines 0 comments Download
A components/subresource_filter/content/browser/content_subresource_filter_driver.cc View 1 chunk +27 lines, -0 lines 0 comments Download
A components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h View 1 1 chunk +66 lines, -0 lines 0 comments Download
A components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc View 1 chunk +85 lines, -0 lines 0 comments Download
A components/subresource_filter/content/common/BUILD.gn View 1 chunk +16 lines, -0 lines 0 comments Download
A components/subresource_filter/content/common/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +13 lines, -0 lines 0 comments Download
A + components/subresource_filter/content/common/subresource_filter_message_generator.h View 1 2 3 4 1 chunk +6 lines, -12 lines 0 comments Download
A + components/subresource_filter/content/common/subresource_filter_message_generator.cc View 1 chunk +1 line, -2 lines 0 comments Download
A components/subresource_filter/content/common/subresource_filter_messages.h View 1 chunk +26 lines, -0 lines 0 comments Download
A + components/subresource_filter/content/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -8 lines 0 comments Download
A + components/subresource_filter/content/renderer/DEPS View 0 chunks +-1 lines, --1 lines 0 comments Download
A components/subresource_filter/content/renderer/subresource_filter_agent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +42 lines, -0 lines 0 comments Download
A components/subresource_filter/content/renderer/subresource_filter_agent.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +77 lines, -0 lines 0 comments Download
A + components/subresource_filter/core/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +11 lines, -13 lines 0 comments Download
A components/subresource_filter/core/browser/subresource_filter_features.h View 1 chunk +28 lines, -0 lines 0 comments Download
A components/subresource_filter/core/browser/subresource_filter_features.cc View 1 chunk +31 lines, -0 lines 0 comments Download
A components/subresource_filter/core/browser/subresource_filter_features_test_support.h View 1 chunk +33 lines, -0 lines 0 comments Download
A components/subresource_filter/core/browser/subresource_filter_features_test_support.cc View 1 chunk +49 lines, -0 lines 0 comments Download
A components/subresource_filter/core/browser/subresource_filter_features_unittest.cc View 1 chunk +49 lines, -0 lines 0 comments Download
A + components/subresource_filter/core/common/BUILD.gn View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
A components/subresource_filter/core/common/activation_state.h View 1 chunk +27 lines, -0 lines 0 comments Download
A components/subresource_filter/core/common/activation_state.cc View 1 chunk +31 lines, -0 lines 0 comments Download
M components/test_runner/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A components/test_runner/mock_web_document_subresource_filter.h View 1 1 chunk +40 lines, -0 lines 0 comments Download
A components/test_runner/mock_web_document_subresource_filter.cc View 1 chunk +33 lines, -0 lines 0 comments Download
M components/test_runner/test_runner.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M components/test_runner/test_runner.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +20 lines, -4 lines 0 comments Download
M components/test_runner/test_runner.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/subresource_filter/resource-disallowed.html View 1 2 3 4 5 6 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/subresource_filter/resource-disallowed-after-redirect.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/subresource_filter/resource-in-import-disallowed.html View 1 2 3 4 5 6 1 chunk +46 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/subresource_filter/resources/alpha.js View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/subresource_filter/resources/beta.js View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/subresource_filter/resources/include-scripts.html View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/browser_protocol.json View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.h View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceRequest.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebDataSourceImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebDataSourceImpl.cpp View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp View 1 2 1 chunk +144 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/web.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h View 1 chunk +22 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebDataSource.h View 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 57 (20 generated)
engedy
Dominic, could you please take an first look?
4 years, 6 months ago (2016-05-30 14:31:29 UTC) #3
battre
https://codereview.chromium.org/2022783002/diff/1/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/2022783002/diff/1/chrome/renderer/chrome_content_renderer_client.cc#newcode520 chrome/renderer/chrome_content_renderer_client.cc:520: new subresource_filter::SubresourceFilterAgent(render_frame); nit: drop namespace if you have a ...
4 years, 6 months ago (2016-05-30 15:29:26 UTC) #4
engedy
Thank you, and sorry for the many nits. https://codereview.chromium.org/2022783002/diff/1/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/2022783002/diff/1/chrome/renderer/chrome_content_renderer_client.cc#newcode520 chrome/renderer/chrome_content_renderer_client.cc:520: new ...
4 years, 6 months ago (2016-05-30 20:54:01 UTC) #5
engedy
@Elliott, Mike: Could you please take a look? As you will see, the CL has ...
4 years, 6 months ago (2016-05-30 21:16:51 UTC) #8
battre
https://codereview.chromium.org/2022783002/diff/1/components/subresource_filter/core/common/activation_state.cc File components/subresource_filter/core/common/activation_state.cc (right): https://codereview.chromium.org/2022783002/diff/1/components/subresource_filter/core/common/activation_state.cc#newcode26 components/subresource_filter/core/common/activation_state.cc:26: break; On 2016/05/30 20:54:00, engedy wrote: > On 2016/05/30 ...
4 years, 6 months ago (2016-05-31 08:28:33 UTC) #9
engedy
https://codereview.chromium.org/2022783002/diff/1/components/subresource_filter/core/common/activation_state.cc File components/subresource_filter/core/common/activation_state.cc (right): https://codereview.chromium.org/2022783002/diff/1/components/subresource_filter/core/common/activation_state.cc#newcode26 components/subresource_filter/core/common/activation_state.cc:26: break; On 2016/05/31 08:28:32, battre wrote: > On 2016/05/30 ...
4 years, 6 months ago (2016-05-31 08:58:16 UTC) #10
engedy
@Mike: Do you think you can find some time to look at this tomorrow? This ...
4 years, 6 months ago (2016-05-31 21:51:46 UTC) #12
esprehn
This patch is huge, does it actually need this much plumbing? How can we do ...
4 years, 6 months ago (2016-05-31 22:08:23 UTC) #13
engedy
(+Jochen to chime in sooner rather than later) > This patch is huge [...] I ...
4 years, 6 months ago (2016-06-01 09:53:35 UTC) #15
Mike West
I've added comments on the bits I know. I haven't taken a close look at ...
4 years, 6 months ago (2016-06-01 13:43:18 UTC) #16
jochen (gone - plz use gerrit)
can you ask somebody from the safe browsing team to review this code?
4 years, 6 months ago (2016-06-01 15:18:30 UTC) #17
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2022783002/diff/20001/chrome/browser/subresource_filter/DEPS File chrome/browser/subresource_filter/DEPS (right): https://codereview.chromium.org/2022783002/diff/20001/chrome/browser/subresource_filter/DEPS#newcode2 chrome/browser/subresource_filter/DEPS:2: "+components/subresource_filter", that includes renderer side code, can you please ...
4 years, 6 months ago (2016-06-01 15:23:33 UTC) #18
engedy
@Nathan, although this CL does not yet contain the parts interfacing with SB (coming near ...
4 years, 6 months ago (2016-06-01 21:00:44 UTC) #20
engedy
Everyone, please take another look. https://codereview.chromium.org/2022783002/diff/20001/chrome/browser/subresource_filter/DEPS File chrome/browser/subresource_filter/DEPS (right): https://codereview.chromium.org/2022783002/diff/20001/chrome/browser/subresource_filter/DEPS#newcode2 chrome/browser/subresource_filter/DEPS:2: "+components/subresource_filter", On 2016/06/01 15:23:33, ...
4 years, 6 months ago (2016-06-02 23:07:20 UTC) #22
Nathan Parker
I'm not sure I'm much help here. Is there a design doc that describes the ...
4 years, 6 months ago (2016-06-02 23:38:02 UTC) #23
engedy
On 2016/06/02 23:38:02, Nathan Parker wrote: > I'm not sure I'm much help here. Is ...
4 years, 6 months ago (2016-06-03 00:30:37 UTC) #24
battre
lgtm
4 years, 6 months ago (2016-06-03 12:57:56 UTC) #25
Mike West
Thanks for taking another pass. Aside from a few testing nits, //third_party/WebKit, //components/test_runner, and //ipc/ipc_message_start.h ...
4 years, 6 months ago (2016-06-03 13:48:51 UTC) #26
Mike West
You'll need someone to stamp third_party/devtools. Perhaps pfeldman@?
4 years, 6 months ago (2016-06-03 13:49:24 UTC) #28
Alexei Svitkine (slow)
use of feature API / variations param API LGTM
4 years, 6 months ago (2016-06-03 20:18:20 UTC) #29
jochen (gone - plz use gerrit)
lgtm
4 years, 6 months ago (2016-06-06 12:05:59 UTC) #30
engedy
@Mike, I have reworked the test to address your concerns. @Pavel, please take a look ...
4 years, 6 months ago (2016-06-06 13:36:01 UTC) #31
engedy
Friendly ping. @Pavel, please take a look at the 3 lines in: /devtools/protocol.json /core/inspector/InspectorResourceAgent.cpp @Elliott, ...
4 years, 6 months ago (2016-06-07 22:05:58 UTC) #34
pfeldman
https://codereview.chromium.org/2022783002/diff/200001/third_party/WebKit/Source/core/inspector/browser_protocol.json File third_party/WebKit/Source/core/inspector/browser_protocol.json (right): https://codereview.chromium.org/2022783002/diff/200001/third_party/WebKit/Source/core/inspector/browser_protocol.json#newcode1019 third_party/WebKit/Source/core/inspector/browser_protocol.json:1019: "enum": ["csp", "mixed-content", "origin", "inspector", "subresource-filter", "other"], lgtm
4 years, 6 months ago (2016-06-07 23:04:03 UTC) #35
esprehn
Please wrap your change description at 80 or 100 columns. Long term I'm not sure ...
4 years, 6 months ago (2016-06-08 01:59:46 UTC) #36
esprehn
engedy@ and I talked offline about this, I think we're fine to land these patches ...
4 years, 6 months ago (2016-06-08 06:53:39 UTC) #38
esprehn
On 2016/06/08 at 06:53:39, esprehn wrote: > engedy@ and I talked offline about this, I ...
4 years, 6 months ago (2016-06-08 06:53:48 UTC) #39
engedy
@Mike, as discussed, could you please also review components/subresource_filter/content/common/? Also, presubmit checks complain that adding ...
4 years, 6 months ago (2016-06-08 10:16:25 UTC) #41
Mike West
On 2016/06/08 at 10:16:25, engedy wrote: > @Mike, as discussed, could you please also review ...
4 years, 6 months ago (2016-06-08 11:43:43 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2022783002/300001
4 years, 6 months ago (2016-06-08 13:07:18 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/197026)
4 years, 6 months ago (2016-06-08 13:16:11 UTC) #47
engedy
@Tom, I have TBR'd you only for the //ipc dependency in c/s_f/content/DEPS. Mike has reviewed ...
4 years, 6 months ago (2016-06-08 13:25:20 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2022783002/300001
4 years, 6 months ago (2016-06-08 13:26:17 UTC) #52
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/9ae0424e95a8fff9a97adfd0845759bd87b0e129 Cr-Commit-Position: refs/heads/master@{#398534}
4 years, 6 months ago (2016-06-08 13:34:50 UTC) #54
commit-bot: I haz the power
Failed to apply patch for components/subresource_filter/content/renderer/DEPS: While running git apply --index -3 -p1; error: repository ...
4 years, 6 months ago (2016-06-08 13:34:51 UTC) #55
xidachen
A revert of this CL (patchset #15 id:300001) has been created in https://codereview.chromium.org/2049733002/ by xidachen@chromium.org. ...
4 years, 6 months ago (2016-06-08 14:53:32 UTC) #56
engedy
4 years, 6 months ago (2016-06-08 15:04:27 UTC) #57
Message was sent while issue was closed.
For documentation's sake: looks like an unrelated flake, CL wasn't reverted in
the end. (At least, not just yet.)

Powered by Google App Engine
This is Rietveld 408576698