Tag sub resources and sub frames as ads resources/frames
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb commit c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb Author: Shivani Sharma <shivanisha@chromium.org> Date: Wed Jan 31 16:36:31 2018 Adds a flag to identify whether a document is an ad subframe. This CL adds a flag to SubresourceFilter which is currently set based on the subresource filter rule set matching. Subsequently this will also be set when the initiator of this frame is an ad resource even if this does not match the subresource filter ruleset. Note that the matching already takes place in the browser process and this flag is set at commit time when the browser process communicates the status of matching to the renderer process. Note that this will work for both browser initiated and renderer initiated subframes (in PlzNavigate) as is currently the case with subresource filter matching. BUG: 807640 Change-Id: If883be8209a7756c6024c1c9eda1a8d081f815a1 Reviewed-on: https://chromium-review.googlesource.com/868261 Commit-Queue: Shivani Sharma <shivanisha@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Reviewed-by: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#533294} [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/components/subresource_filter/content/common/subresource_filter_messages.h [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/components/subresource_filter/content/renderer/subresource_filter_agent.cc [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/components/subresource_filter/content/renderer/subresource_filter_agent.h [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/third_party/WebKit/Source/core/exported/WebDocumentLoaderImpl.cpp [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/third_party/WebKit/Source/core/exported/WebDocumentLoaderImpl.h [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/third_party/WebKit/Source/core/loader/SubresourceFilter.cpp [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/third_party/WebKit/Source/core/loader/SubresourceFilter.h [modify] https://crrev.com/c611c38b47a7a945d7d9de7b9ecc0a7b4de866bb/third_party/WebKit/public/web/WebDocumentLoader.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e8d16083dd0335f37fcd92b8d19ac8f2bc08fdc1 commit e8d16083dd0335f37fcd92b8d19ac8f2bc08fdc1 Author: Shivani Sharma <shivanisha@chromium.org> Date: Wed Jan 31 18:07:12 2018 Propagation of ad tagging from parent frame to child frame. This CL tags a subframe as an ad if its parent frame is tagged as well. This extends the coverage of frames tagged as ads from just those that match the ruleset to those that do not match but their parent frame is tagged as an ad frame. BUG: 807640 Change-Id: Ifee656298cdbe8bc16bcd24a16bc9a9905e2c2a3 Reviewed-on: https://chromium-review.googlesource.com/894542 Commit-Queue: Shivani Sharma <shivanisha@chromium.org> Reviewed-by: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#533323} [modify] https://crrev.com/e8d16083dd0335f37fcd92b8d19ac8f2bc08fdc1/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc [modify] https://crrev.com/e8d16083dd0335f37fcd92b8d19ac8f2bc08fdc1/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h [modify] https://crrev.com/e8d16083dd0335f37fcd92b8d19ac8f2bc08fdc1/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9bfd7b7c62bdae008895590a55a50c16ac4781bc commit 9bfd7b7c62bdae008895590a55a50c16ac4781bc Author: Charles Harrison <csharrison@chromium.org> Date: Tue Feb 13 22:13:30 2018 [subresource_filter] Add base::Feature for ad tagging This feature just turns on the dryrun mode for subresource_filter. This will allow experimentation to be a lot simpler, rather than using the enable_preset params. Bug: 807640 Change-Id: If620dec424bbd6381054e35cc577a57557c6ed5a Reviewed-on: https://chromium-review.googlesource.com/916531 Reviewed-by: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Shivani Sharma <shivanisha@chromium.org> Commit-Queue: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#536504} [modify] https://crrev.com/9bfd7b7c62bdae008895590a55a50c16ac4781bc/components/subresource_filter/core/browser/subresource_filter_features.cc [modify] https://crrev.com/9bfd7b7c62bdae008895590a55a50c16ac4781bc/components/subresource_filter/core/browser/subresource_filter_features.h [modify] https://crrev.com/9bfd7b7c62bdae008895590a55a50c16ac4781bc/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/337fd8936f36e230b07d7737c58203d9f7392a58 commit 337fd8936f36e230b07d7737c58203d9f7392a58 Author: Shivani Sharma <shivanisha@chromium.org> Date: Fri Feb 16 17:00:11 2018 Add a flag to ResourceRequest identifying whether it as an ad resource. This CL adds a flag to ResourceRequest which is currently set based on the subresource filter component matching. Subsequently this will also be set when the initiator of this resource is an ad resource even if this does not match the subresource filter ruleset. This plumbs the flag from blink::ResourceRequest up to content::ResourceRequest so that it can be used in the browser process as well in a future CL. Bug: 807640 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo Change-Id: I09fe5b3168cae53b47b4eefff4a1bddfac6a98b4 Reviewed-on: https://chromium-review.googlesource.com/860619 Commit-Queue: Shivani Sharma <shivanisha@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#537324} [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/core/loader/BaseFetchContext.h [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/core/loader/SubresourceFilter.cpp [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/core/loader/SubresourceFilter.h [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.cpp [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.h [modify] https://crrev.com/337fd8936f36e230b07d7737c58203d9f7392a58/third_party/WebKit/Source/platform/loader/fetch/ResourceRequestTest.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9f393a361a415db8e0c87697c95b88dc7b85f18e commit 9f393a361a415db8e0c87697c95b88dc7b85f18e Author: Shivani Sharma <shivanisha@chromium.org> Date: Wed Feb 21 14:17:42 2018 Tag a subresource as an ad if fetched from a frame tagged as ad. This CL tags sub-resources as ads even if they did not match the subresource filter ruleset, because they are fetched from frames that are tagged as ads. A quick check on a news site shows a large number of resources tagged via this logic. FrameFetchContextSubresourceFilterTest.AdTaggingBasedOnFrame Test: webkit_unit_tests --gtest_filter= Bug: 807640 Change-Id: I225408385e268fb0f3223309ae7cfe6bd68ef613 Reviewed-on: https://chromium-review.googlesource.com/897891 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Commit-Queue: Shivani Sharma <shivanisha@chromium.org> Cr-Commit-Position: refs/heads/master@{#538094} [modify] https://crrev.com/9f393a361a415db8e0c87697c95b88dc7b85f18e/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp [modify] https://crrev.com/9f393a361a415db8e0c87697c95b88dc7b85f18e/third_party/WebKit/Source/core/loader/SubresourceFilter.cpp
Issue 742397 has been merged into this issue.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/34e708854fb4a5211fb59f6f3f86f41edef84360 commit 34e708854fb4a5211fb59f6f3f86f41edef84360 Author: Shivani Sharma <shivanisha@chromium.org> Date: Tue Mar 20 21:25:33 2018 Tag a dedicated worker as an ad if created from an ad frame This CL propagates the ad frame status from the subresource filter of a frame to a dedicated worker created by that frame. Also does some refactoring by moving the ad frame boolean flag from SubresourceFilter to WebDocumentSubresourceFilter since that is what the worker path accesses. Bug: 807640 Change-Id: Ieee958f7f0ccbffbdb3978a2aa88a0954832c231 Reviewed-on: https://chromium-review.googlesource.com/901962 Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Pavel Feldman <pfeldman@chromium.org> Commit-Queue: Shivani Sharma <shivanisha@chromium.org> Cr-Commit-Position: refs/heads/master@{#544523} [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/components/subresource_filter/content/renderer/subresource_filter_agent.cc [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/components/subresource_filter/content/renderer/subresource_filter_agent.h [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/components/subresource_filter/content/renderer/web_document_subresource_filter_impl.cc [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/components/subresource_filter/content/renderer/web_document_subresource_filter_impl.h [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/content/shell/test_runner/mock_web_document_subresource_filter.cc [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/content/shell/test_runner/mock_web_document_subresource_filter.h [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/third_party/WebKit/Source/core/exported/WebDocumentLoaderImpl.cpp [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/third_party/WebKit/Source/core/exported/WebDocumentLoaderImpl.h [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/third_party/WebKit/Source/core/exported/WebDocumentSubresourceFilterTest.cpp [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/third_party/WebKit/Source/core/loader/SubresourceFilter.cpp [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/third_party/WebKit/Source/core/loader/SubresourceFilter.h [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h [modify] https://crrev.com/34e708854fb4a5211fb59f6f3f86f41edef84360/third_party/WebKit/public/web/WebDocumentLoader.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/89bed79700b74f84df0c25ed2ffae5e81d570c34 commit 89bed79700b74f84df0c25ed2ffae5e81d570c34 Author: Charles Harrison <csharrison@chromium.org> Date: Wed Mar 21 12:38:23 2018 [subresource_filter] Run browser tests with adtagging This is the configuration that we want to ship, but we probably aren't ready to add it to the fieldtrial testing configs yet. Bug: 807640 Change-Id: Ic76af75e776466808e5c3578c242a4b26f317ad7 Reviewed-on: https://chromium-review.googlesource.com/972362 Reviewed-by: Josh Karlin <jkarlin@chromium.org> Commit-Queue: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#544673} [modify] https://crrev.com/89bed79700b74f84df0c25ed2ffae5e81d570c34/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc [modify] https://crrev.com/89bed79700b74f84df0c25ed2ffae5e81d570c34/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cdad395bc647ec3a9029947c954943ad4d37238b commit cdad395bc647ec3a9029947c954943ad4d37238b Author: Shivani Sharma <shivanisha@chromium.org> Date: Thu Mar 22 22:07:27 2018 Tag a subresource as an ad if the stack trace contains an ad script. This CL tags a subresource as an ad when the following is true: - the resource URL does not match the ruleset - the resource's frame is not tagged as ad. - But the pseudo stack trace as maintained by the PerformanceMonitor contains a script that has been tagged as an ad. Note that it is a pseudo stack trace since getting the complete stack trace from V8 would be expensive. This CL captures the bottom of the stack trace in the following cases: - A script is executed from native code either for an async or sync call. - A script module is executed from native code Note that the above could be reentrant if there is a script that's executing , goes in native code and then the native code calls back into a script. In that case there will be multiple scripts on the pseduo stack trace and if one of them have been tagged as an ad, this subresource will be tagged as well. Bug: 807640 Change-Id: I0085f4265ecea2e8a01717b6462138b65bdda2a9 Reviewed-on: https://chromium-review.googlesource.com/946828 Commit-Queue: Shivani Sharma <shivanisha@chromium.org> Reviewed-by: Pavel Feldman <pfeldman@chromium.org> Cr-Commit-Position: refs/heads/master@{#545269} [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/BUILD.gn [add] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/frame/AdTracker.cpp [add] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/frame/AdTracker.h [add] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/frame/AdTrackerTest.cpp [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/frame/BUILD.gn [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/frame/LocalFrame.cpp [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/frame/LocalFrame.h [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/probe/CoreProbes.json5 [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/probe/CoreProbes.pidl [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/script/ModuleScript.cpp [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/core/script/ModuleScript.h [modify] https://crrev.com/cdad395bc647ec3a9029947c954943ad4d37238b/third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5b86b2192fe1b1729e1012b41c918fba0e72831d commit 5b86b2192fe1b1729e1012b41c918fba0e72831d Author: Charlie Harrison <csharrison@chromium.org> Date: Fri Mar 23 13:30:36 2018 [subresource_filter] Actually test ad-tagging config in browser tests The SetUp() phase of the browser test harness was resetting the global configuration to something more standard (only enabling on phishing sites). This CL changes that to just use the default, and fixes one test that broke. Bug: 807640 Change-Id: Ieb60b5c323797175902d0a99f01044b199972c12 Reviewed-on: https://chromium-review.googlesource.com/976543 Reviewed-by: Josh Karlin <jkarlin@chromium.org> Commit-Queue: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#545417} [modify] https://crrev.com/5b86b2192fe1b1729e1012b41c918fba0e72831d/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc [modify] https://crrev.com/5b86b2192fe1b1729e1012b41c918fba0e72831d/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8e5b4ae518cdbf571dcc2f27910f6a7e34195206 commit 8e5b4ae518cdbf571dcc2f27910f6a7e34195206 Author: Josh Karlin <jkarlin@chromium.org> Date: Tue Mar 27 18:11:12 2018 [AdTagging] Track resources loaded from memory cache Requests served from memory cache don't have the is_ad bit in their newly minted ResourceRequests. The bit is needed by the AdTracker class that receives a probe on WillSendRequest. This CL copies the bit over to the new request and tests it. Bug: 807640 Change-Id: I9656446be52eb19159a84c26cbdf47905a0e1989 Reviewed-on: https://chromium-review.googlesource.com/980700 Reviewed-by: Nate Chapin <japhet@chromium.org> Commit-Queue: Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#546166} [modify] https://crrev.com/8e5b4ae518cdbf571dcc2f27910f6a7e34195206/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp [modify] https://crrev.com/8e5b4ae518cdbf571dcc2f27910f6a7e34195206/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp [modify] https://crrev.com/8e5b4ae518cdbf571dcc2f27910f6a7e34195206/third_party/WebKit/Source/platform/loader/testing/MockFetchContext.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bf5b0e09aa81fd00a9586d71cecf96e3e508e946 commit bf5b0e09aa81fd00a9586d71cecf96e3e508e946 Author: Josh Karlin <jkarlin@chromium.org> Date: Tue Apr 10 13:48:20 2018 [AdTracking] Include the top of the stack in AdTracker detection Includes the script of the top stack frame in ads detection processing. Bug: 807640 Change-Id: I8f4d0364ea088bf00abcc7310e4dccce7fec78f3 Reviewed-on: https://chromium-review.googlesource.com/986337 Commit-Queue: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Cr-Commit-Position: refs/heads/master@{#549509} [modify] https://crrev.com/bf5b0e09aa81fd00a9586d71cecf96e3e508e946/third_party/blink/renderer/core/frame/AdTracker.cpp [modify] https://crrev.com/bf5b0e09aa81fd00a9586d71cecf96e3e508e946/third_party/blink/renderer/core/frame/AdTracker.h [modify] https://crrev.com/bf5b0e09aa81fd00a9586d71cecf96e3e508e946/third_party/blink/renderer/core/frame/AdTrackerTest.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0f3481835c4385171612117cd0f72494876cce2a commit 0f3481835c4385171612117cd0f72494876cce2a Author: Josh Karlin <jkarlin@chromium.org> Date: Thu Apr 19 20:27:09 2018 [AdTracking] Speed up SubresourceFilter::IsAdResource Check if the frame is an ad frame before checking the filter list. Bug: 807640 Change-Id: Ic8a3e1e4ceca3ed64ff39895c697205d3c1477b0 Reviewed-on: https://chromium-review.googlesource.com/1018426 Commit-Queue: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Cr-Commit-Position: refs/heads/master@{#552144} [modify] https://crrev.com/0f3481835c4385171612117cd0f72494876cce2a/third_party/blink/renderer/core/loader/subresource_filter.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/83609dcbec69dcc95120e288d5286c23b366284b commit 83609dcbec69dcc95120e288d5286c23b366284b Author: Josh Karlin <jkarlin@chromium.org> Date: Thu Apr 26 00:26:11 2018 [AdTracking] Tag local subframes as ads if ad script is in stack on creation If the AdTracker sees an ad script in the stack when a frame is created, or its parent frame is thought to be an ad, label the LocalFrame as an ad frame. The subresource filter will then label subsequent requests in that frame as ad requests. A future CL will handle situations where the frame changes processes. Bug: 807640 Change-Id: Ie4d3bab747c3158d310652f6376cc79f6da38b7a Reviewed-on: https://chromium-review.googlesource.com/1019743 Commit-Queue: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#553845} [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/components/subresource_filter/content/renderer/subresource_filter_agent.cc [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/components/subresource_filter/content/renderer/subresource_filter_agent.h [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/public/web/web_document_loader.h [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/public/web/web_local_frame.h [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/exported/web_document_loader_impl.cc [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/exported/web_document_loader_impl.h [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/frame/ad_tracker.cc [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/frame/ad_tracker.h [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/frame/local_frame.cc [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/frame/local_frame.h [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/frame/web_local_frame_impl.h [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/loader/subresource_filter.cc [modify] https://crrev.com/83609dcbec69dcc95120e288d5286c23b366284b/third_party/blink/renderer/core/loader/subresource_filter.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d2dc7a9eacc4ffa5832e769f1b5a3ddb10f808db commit d2dc7a9eacc4ffa5832e769f1b5a3ddb10f808db Author: Josh Karlin <jkarlin@chromium.org> Date: Mon Apr 30 19:28:35 2018 Rename AnyExecutingScriptsTaggedAsAdResource to IsAdScriptInStack Rename to simplify the code Bug: 807640 Change-Id: Ib7a7e76ec6db79cbd4423de60719d53f79e02926 Reviewed-on: https://chromium-review.googlesource.com/1035466 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#554845} [modify] https://crrev.com/d2dc7a9eacc4ffa5832e769f1b5a3ddb10f808db/third_party/blink/renderer/core/frame/ad_tracker.cc [modify] https://crrev.com/d2dc7a9eacc4ffa5832e769f1b5a3ddb10f808db/third_party/blink/renderer/core/frame/ad_tracker.h [modify] https://crrev.com/d2dc7a9eacc4ffa5832e769f1b5a3ddb10f808db/third_party/blink/renderer/core/frame/ad_tracker_test.cc [modify] https://crrev.com/d2dc7a9eacc4ffa5832e769f1b5a3ddb10f808db/third_party/blink/renderer/core/frame/local_frame.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cd01299550338932db12bbb5f90ac3eb7f65b3fa commit cd01299550338932db12bbb5f90ac3eb7f65b3fa Author: Josh Karlin <jkarlin@chromium.org> Date: Tue Jun 05 10:38:53 2018 [AdTagging] Scope ad scripts to the LocalFrame and not LocalRoot What: Keep track of ad-scripts per-document instead of per-LocalRoot in the AdTracker. Why: Resources labeled as ad resources due to being in an ad frame were then causing resources with the same URLs in vanilla frames (with the same local root) to be labelled as ad resources. Tests: * Created a SimTest to verify the fix. * Moved a test from frame_fetch_context_test into a SimTest. Bug: 807640 Change-Id: I6ba70757fb9b3aa07246eea76f9b86886a972b02 Reviewed-on: https://chromium-review.googlesource.com/1071729 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#564435} [modify] https://crrev.com/cd01299550338932db12bbb5f90ac3eb7f65b3fa/third_party/blink/renderer/core/frame/ad_tracker.cc [modify] https://crrev.com/cd01299550338932db12bbb5f90ac3eb7f65b3fa/third_party/blink/renderer/core/frame/ad_tracker.h [modify] https://crrev.com/cd01299550338932db12bbb5f90ac3eb7f65b3fa/third_party/blink/renderer/core/frame/ad_tracker_test.cc [modify] https://crrev.com/cd01299550338932db12bbb5f90ac3eb7f65b3fa/third_party/blink/renderer/core/frame/local_frame.cc [modify] https://crrev.com/cd01299550338932db12bbb5f90ac3eb7f65b3fa/third_party/blink/renderer/core/frame/local_frame.h [modify] https://crrev.com/cd01299550338932db12bbb5f90ac3eb7f65b3fa/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc [modify] https://crrev.com/cd01299550338932db12bbb5f90ac3eb7f65b3fa/third_party/blink/renderer/core/testing/sim/sim_request.cc
Comment 1 by bugdroid1@chromium.org
, Jan 31 2018