New issue
Advanced search Search tips

Issue 829042 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 829992



Sign in to add a comment

Delay insecure / non-isolated ad requests

Project Member Reported by csharrison@chromium.org, Apr 4 2018

Issue description

We want the ads ecosystem to move to secure, isolated environments to render ad creatives.

To incentivize this shift, we should try experimenting with introducing artificial delay to http ad requests, or ad requests in same-origin iframes.

This will hook into existing infrastructure for tagging ad requests at Chrome runtime.
 
Blockedon: 829992
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 9 2018

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

commit 294b742e82f550b39e62dea5a5e2783661856ac8
Author: Charlie Harrison <csharrison@chromium.org>
Date: Mon Apr 09 22:17:33 2018

[ad-delay] Delay insecure ad subresources

This CL adds a URLLoaderThrottle to renderer subresource requests
that delays the navigation by a fixed amount (default 50ms) if it
detects that the resource request is an insecure (e.g. http) ad
request.

The URLLoaderThrottle will be re-used in the browser process for
subframe navigations, so care has been made to fit it in the
content/common layer.

Some other misc changes to make this happen / testable:
 - Add IsAdResource() to blink::WebURLRequest
 - URLLoaderThrottleProvider changed to take a full blink::WebURLRequest
   instead of a blink::WebURL.
 - TestURLLoaderFactory extended to support redirects.
 - ThrottlingURLLoader partly exposed to content/public/test.

Bug: 829042
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Ia98891ed8c07a3c85e1f9986c29d841698ed9228
Reviewed-on: https://chromium-review.googlesource.com/994152
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549300}
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/android_webview/renderer/aw_url_loader_throttle_provider.cc
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/android_webview/renderer/aw_url_loader_throttle_provider.h
[add] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/chrome/browser/subresource_filter/ad_delay_browsertest.cc
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/chrome/renderer/DEPS
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/chrome/renderer/url_loader_throttle_provider_impl.cc
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/chrome/renderer/url_loader_throttle_provider_impl.h
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/chrome/test/BUILD.gn
[add] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/chrome/test/data/subresource_filter/frame_with_multiple_fetches.html
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/components/subresource_filter/content/DEPS
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/components/subresource_filter/content/common/BUILD.gn
[add] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/components/subresource_filter/content/common/ad_delay_throttle.cc
[add] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/components/subresource_filter/content/common/ad_delay_throttle.h
[add] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/components/subresource_filter/content/common/ad_delay_throttle_unittest.cc
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/components/subresource_filter/content/renderer/BUILD.gn
[add] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/components/subresource_filter/content/renderer/ad_delay_renderer_metadata_provider.cc
[add] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/components/subresource_filter/content/renderer/ad_delay_renderer_metadata_provider.h
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/content/public/renderer/url_loader_throttle_provider.h
[add] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/content/public/test/throttling_url_loader_test_util.cc
[add] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/content/public/test/throttling_url_loader_test_util.h
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/content/renderer/service_worker/service_worker_fetch_context_impl.cc
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/content/test/BUILD.gn
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/services/network/test/test_url_loader_factory.cc
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/services/network/test/test_url_loader_factory_unittest.cc
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/third_party/blink/public/platform/web_url_request.h
[modify] https://crrev.com/294b742e82f550b39e62dea5a5e2783661856ac8/third_party/blink/renderer/platform/exported/web_url_request.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 10 2018

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

commit 2d7d60305ad5434610790b722dce832bed821902
Author: Charlie Harrison <csharrison@chromium.org>
Date: Tue Apr 10 05:29:10 2018

[ad-delay] Log secure metrics

This CL:
 - Changes the AdDelayThrottle lifetime so it is always created, in
   an enabled or dryrun state
 - Adds an enum histogram for the product of {isAd, isSecure} in
   the destructor.
 - Fixes a bug where syncXHRs were breaking due to us not
   properly handling DetachFromCurrentSequence(). Added a
   browser test for that case.

Bug: 829042
Change-Id: Ib4bc572f1edce2c975b72f4a6d128c65b6acd2bc
Reviewed-on: https://chromium-review.googlesource.com/998537
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Gayane Petrosyan <gayane@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549428}
[modify] https://crrev.com/2d7d60305ad5434610790b722dce832bed821902/chrome/browser/subresource_filter/ad_delay_browsertest.cc
[modify] https://crrev.com/2d7d60305ad5434610790b722dce832bed821902/components/subresource_filter/content/common/ad_delay_throttle.cc
[modify] https://crrev.com/2d7d60305ad5434610790b722dce832bed821902/components/subresource_filter/content/common/ad_delay_throttle.h
[modify] https://crrev.com/2d7d60305ad5434610790b722dce832bed821902/components/subresource_filter/content/common/ad_delay_throttle_unittest.cc
[modify] https://crrev.com/2d7d60305ad5434610790b722dce832bed821902/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/2d7d60305ad5434610790b722dce832bed821902/tools/metrics/histograms/histograms.xml

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 11 2018

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

commit a1fa6a100a913870ff2eb0fcdf20be26b7e19d89
Author: Charlie Harrison <csharrison@chromium.org>
Date: Wed Apr 11 13:17:55 2018

[ad-delay] Gate feature on ad-tagging

This involves moving the ad tagging Feature into the common layer.

The reasoning for this is that a fieldtrial is only "activated" if an
associated base::Feature is queried. Since the ad delay experiment
relies on ad-tagging, this will ensure that *no* groups (including
control groups) will be activated if ad-tagging is disabled.

Bug: 829042
Change-Id: I0bae55654ee1e33a55903232b75f9039651f8dc4
Reviewed-on: https://chromium-review.googlesource.com/1005574
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549867}
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/chrome/browser/subresource_filter/ad_delay_browsertest.cc
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/content/browser/content_ruleset_service.cc
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/content/common/ad_delay_throttle.cc
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/content/common/ad_delay_throttle.h
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/content/common/ad_delay_throttle_unittest.cc
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/core/browser/BUILD.gn
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/core/browser/subresource_filter_features.cc
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/core/browser/subresource_filter_features.h
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc
[modify] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/core/common/BUILD.gn
[add] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/core/common/common_features.cc
[add] https://crrev.com/a1fa6a100a913870ff2eb0fcdf20be26b7e19d89/components/subresource_filter/core/common/common_features.h

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 13 2018

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

commit 9ba4c19cf1fff1f66f632d9fcd4259b94a448607
Author: Charlie Harrison <csharrison@chromium.org>
Date: Fri Apr 13 17:27:22 2018

[ad-delay] Add delays for non-isolated ads

This CL also adds some infrastructure for a more general "condition
tracker" in the throttle.

Bug: 829042
Change-Id: Ib8399025bed474395fa9b709c1b68469ccc34476
Reviewed-on: https://chromium-review.googlesource.com/1006378
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550666}
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/chrome/browser/subresource_filter/ad_delay_browsertest.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/chrome/renderer/url_loader_throttle_provider_impl.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/common/ad_delay_throttle.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/common/ad_delay_throttle.h
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/common/ad_delay_throttle_unittest.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/renderer/ad_delay_renderer_metadata_provider.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/renderer/ad_delay_renderer_metadata_provider.h
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/core/common/common_features.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/core/common/common_features.h

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ba4c19cf1fff1f66f632d9fcd4259b94a448607

commit 9ba4c19cf1fff1f66f632d9fcd4259b94a448607
Author: Charlie Harrison <csharrison@chromium.org>
Date: Fri Apr 13 17:27:22 2018

[ad-delay] Add delays for non-isolated ads

This CL also adds some infrastructure for a more general "condition
tracker" in the throttle.

Bug: 829042
Change-Id: Ib8399025bed474395fa9b709c1b68469ccc34476
Reviewed-on: https://chromium-review.googlesource.com/1006378
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550666}
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/chrome/browser/subresource_filter/ad_delay_browsertest.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/chrome/renderer/url_loader_throttle_provider_impl.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/common/ad_delay_throttle.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/common/ad_delay_throttle.h
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/common/ad_delay_throttle_unittest.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/renderer/ad_delay_renderer_metadata_provider.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/content/renderer/ad_delay_renderer_metadata_provider.h
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/core/common/common_features.cc
[modify] https://crrev.com/9ba4c19cf1fff1f66f632d9fcd4259b94a448607/components/subresource_filter/core/common/common_features.h

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 20 2018

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

commit 7324e68ec98ccb4ae5b69b931d0e9b7b71f75668
Author: Charlie Harrison <csharrison@chromium.org>
Date: Fri Apr 20 22:29:46 2018

[ad-delay] Add more AdDelay metrics

This CL adds four new metrics:
 - Logs an isolated/non-isolated bit per request
 - Logs real-delay per request
 - Logs the expected delay per request
 - Logs the queueing (i.e. unexpected) delay per request

Bug: 829042
Change-Id: Id31f3e062cda0f9b644466eb06be21b471a80d4e
Reviewed-on: https://chromium-review.googlesource.com/1021913
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552497}
[modify] https://crrev.com/7324e68ec98ccb4ae5b69b931d0e9b7b71f75668/components/subresource_filter/content/common/ad_delay_throttle.cc
[modify] https://crrev.com/7324e68ec98ccb4ae5b69b931d0e9b7b71f75668/components/subresource_filter/content/common/ad_delay_throttle.h
[modify] https://crrev.com/7324e68ec98ccb4ae5b69b931d0e9b7b71f75668/components/subresource_filter/content/common/ad_delay_throttle_unittest.cc
[modify] https://crrev.com/7324e68ec98ccb4ae5b69b931d0e9b7b71f75668/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/7324e68ec98ccb4ae5b69b931d0e9b7b71f75668/tools/metrics/histograms/histograms.xml

Sign in to add a comment