Introduce the SafeBrowsingTriggeredPopupBlocker

Desktop / Chromium - Charles Harrison [chromium.org] - 12 October 2017 16:04 EDT

This CL changes no existing behavior. The new feature is only exercised in unit tests.

This CL introduces a new form of popup blocker, one which applies a stronger policy to sites marked via safe browsing. The new object is designed to be owned by the popup_blocker_tab_helper.

Note: This feature is already more or less implemented in components/subresource_filter, but we're trying to separate it from that feature since they are only related in that they are both triggered via safe browsing.

Bug: 761385 Change-Id: I98762e213157453f2ceb97adcc22f1a4c86d1033 Reviewed-on: https://chromium-review.googlesource.com/706518

60f7c65 Introduce the SafeBrowsingTriggeredPopupBlocker
chrome/browser/DEPS | 1 +
chrome/browser/ui/BUILD.gn | 3 +
.../safe_browsing_triggered_popup_blocker.cc | 134 ++++++++++++
.../safe_browsing_triggered_popup_blocker.h | 74 +++++++
...fe_browsing_triggered_popup_blocker_unittest.cc | 239 +++++++++++++++++++++
chrome/test/BUILD.gn | 1 +
6 files changed, 452 insertions(+)

Upstream: git.chromium.org


  • Share