As part of SB & WebView integration, we need to componentize SafeBrowsing blocking page and its related code.
Here are some of the CLs that I landed to componentize safe_browsing_db, you might find them useful: https://chromium.googlesource.com/chromium/src/+/9d588802e87e1776c0e55f7c0e8b21dc5acbf1bd https://chromium.googlesource.com/chromium/src/+/d0a17ec746888e2ec643991c9a155920c2de2378 https://chromium.googlesource.com/chromium/src/+/27f7e227bffc205b913237ab3a080210aadf5a1b These should give you an idea of the files that would need to be touched i.e. BUILD.gn, DEPS, OWENERS, ...
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/792a666e12699e4e19e7e134e31759808fd0b6d0 commit 792a666e12699e4e19e7e134e31759808fd0b6d0 Author: jialiul <jialiul@chromium.org> Date: Sat Dec 03 01:44:10 2016 Move SafeBrowsingUIManager::UnsafeResource to security_interstitials component. UnsafeResource is used in creating/showing SB interstitial, thus this is a preparation step of componentizing SB interstitial. BUG= 666100 Review-Url: https://codereview.chromium.org/2540563002 Cr-Commit-Position: refs/heads/master@{#436136} [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/BUILD.gn [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/loader/data_reduction_proxy_resource_throttle_android.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/loader/data_reduction_proxy_resource_throttle_android.h [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/loader/safe_browsing_resource_throttle.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/loader/safe_browsing_resource_throttle.h [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/browser_feature_extractor.h [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/client_side_detection_host.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/client_side_detection_host.h [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/safe_browsing_blocking_page.h [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/threat_details.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/threat_details.h [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/threat_details_unittest.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/ui_manager.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/ui_manager.h [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/safe_browsing/ui_manager_unittest.cc [modify] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/chrome/browser/ui/webui/interstitials/interstitial_ui.cc [add] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/components/security_interstitials/content/BUILD.gn [add] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/components/security_interstitials/content/DEPS [add] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/components/security_interstitials/content/unsafe_resource.cc [add] https://crrev.com/792a666e12699e4e19e7e134e31759808fd0b6d0/components/security_interstitials/content/unsafe_resource.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/68ea739f83af7661f140802bd8941a577f02eb30 commit 68ea739f83af7661f140802bd8941a577f02eb30 Author: jialiul <jialiul@chromium.org> Date: Fri Dec 16 19:15:52 2016 This is one of several CLs to componentize SafeBrowsingBlockingPage. (1) Create SafeBrowsingErrorUI in security_interstitials component. Move display and command handling logic from SafeBrowsingBlockingPage to SafeBrowsingErrorUI. (2) Move all SB interstitial related strings from c/a/generated_reources.grd to components/security_interstitials_strings.grdp (3) Deprecate all interstitial related rappor metrics, since nobody is using them. BUG= 666100 Review-Url: https://codereview.chromium.org/2575623002 Cr-Commit-Position: refs/heads/master@{#439163} [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/chrome/app/generated_resources.grd [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/chrome/browser/interstitials/chrome_controller_client.cc [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/chrome/browser/interstitials/chrome_controller_client.h [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/chrome/browser/interstitials/chrome_metrics_helper.cc [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/chrome/browser/interstitials/chrome_metrics_helper.h [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/chrome/browser/safe_browsing/safe_browsing_blocking_page.h [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/chrome/browser/ssl/cert_report_helper.cc [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/chrome/browser/ssl/ssl_blocking_page.cc [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/components/security_interstitials/core/BUILD.gn [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/components/security_interstitials/core/controller_client.h [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/components/security_interstitials/core/metrics_helper.cc [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/components/security_interstitials/core/metrics_helper.h [add] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/components/security_interstitials/core/safe_browsing_error_ui.cc [add] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/components/security_interstitials/core/safe_browsing_error_ui.h [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/components/security_interstitials_strings.grdp [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/ios/chrome/browser/interstitials/ios_chrome_controller_client.h [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/ios/chrome/browser/interstitials/ios_chrome_controller_client.mm [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/ios/chrome/browser/interstitials/ios_chrome_metrics_helper.mm [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/ios/chrome/browser/ssl/ios_ssl_blocking_page.mm [modify] https://crrev.com/68ea739f83af7661f140802bd8941a577f02eb30/tools/metrics/rappor/rappor.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4f72435657dcfb39b4a712f8476dc000df97073d commit 4f72435657dcfb39b4a712f8476dc000df97073d Author: jialiul <jialiul@chromium.org> Date: Fri Dec 16 22:12:34 2016 Add jialiul@ to components/security_interstitials OWNER file for componentization purpose. BUG= 666100 Review-Url: https://codereview.chromium.org/2584003002 Cr-Commit-Position: refs/heads/master@{#439211} [modify] https://crrev.com/4f72435657dcfb39b4a712f8476dc000df97073d/components/security_interstitials/OWNERS
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a2c0692563f58517c32e839312695e91f45971a3 commit a2c0692563f58517c32e839312695e91f45971a3 Author: jialiul <jialiul@chromium.org> Date: Thu Jan 05 18:13:04 2017 Move SecurityInterstitialPage into components/security_interstitial/content. And resolve all the dependencies and tests and so on. BUG= 666100 Review-Url: https://codereview.chromium.org/2603433002 Cr-Commit-Position: refs/heads/master@{#441701} [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/BUILD.gn [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/captive_portal/captive_portal_browsertest.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/interstitials/chrome_controller_client.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/interstitials/chrome_controller_client.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/interstitials/security_interstitial_page_test_utils.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/interstitials/security_interstitial_page_test_utils.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/policy/policy_browsertest.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/safe_browsing/safe_browsing_blocking_page.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/ssl/bad_clock_blocking_page.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/ssl/bad_clock_blocking_page.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/ssl/captive_portal_blocking_page.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/ssl/captive_portal_blocking_page.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/ssl/cert_report_helper.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/ssl/ssl_blocking_page.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/ssl/ssl_blocking_page.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/chrome/browser/ssl/ssl_browser_tests.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/safe_browsing/BUILD.gn [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/security_interstitials/content/BUILD.gn [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/security_interstitials/content/DEPS [add] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/security_interstitials/content/security_interstitial_controller_client.cc [add] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/security_interstitials/content/security_interstitial_controller_client.h [rename] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/security_interstitials/content/security_interstitial_page.cc [rename] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/security_interstitials/content/security_interstitial_page.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/security_interstitials/core/controller_client.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/security_interstitials/core/safe_browsing_error_ui.cc [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/components/security_interstitials/core/safe_browsing_error_ui.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/ios/chrome/browser/interstitials/ios_chrome_controller_client.h [modify] https://crrev.com/a2c0692563f58517c32e839312695e91f45971a3/ios/chrome/browser/interstitials/ios_chrome_controller_client.mm
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3d6032edf2e884a270692a0fba98637bf525a52b commit 3d6032edf2e884a270692a0fba98637bf525a52b Author: jialiul <jialiul@chromium.org> Date: Thu Jan 12 00:41:31 2017 Componentize SafeBrowsingBlockingPage for WebView use 1. Create a BaseBlockingPage in components/safe_browsing, and move basic user interaction handling logic into this class 2. Implement BaseUIManager::DisplayBlockingPage to work with BaseBlockingPage 3. Make security_interstitials::MetricsHelper a non-abstract class, such that it can be instantiated by BaseBlockingPage 4. Adjust unit_tests and browser_tests 5. Rename BaseSafeBrowsingUIManager to BaseUIManager, BaseSafeBrowsingResourceThrottle to safe_browsing::ResourceThrottle Overall, no logic change in chrome/browser/safe_browsing/SafeBrowsingBlockingPage class BUG= 666100 Review-Url: https://codereview.chromium.org/2623733002 Cr-Commit-Position: refs/heads/master@{#443087} [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/loader/safe_browsing_resource_throttle.cc [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/loader/safe_browsing_resource_throttle.h [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/safe_browsing/threat_details.cc [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/safe_browsing/threat_details.h [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/safe_browsing/ui_manager.cc [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/safe_browsing/ui_manager.h [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/chrome/browser/safe_browsing/ui_manager_unittest.cc [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/safe_browsing/BUILD.gn [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/safe_browsing/DEPS [add] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/safe_browsing/base_blocking_page.cc [add] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/safe_browsing/base_blocking_page.h [rename] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/safe_browsing/base_resource_throttle.cc [rename] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/safe_browsing/base_resource_throttle.h [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/safe_browsing/base_ui_manager.cc [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/safe_browsing/base_ui_manager.h [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/security_interstitials/content/security_interstitial_page.h [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/security_interstitials/core/metrics_helper.cc [modify] https://crrev.com/3d6032edf2e884a270692a0fba98637bf525a52b/components/security_interstitials/core/metrics_helper.h
Comment 1 by vakh@chromium.org
, Nov 17 2016