From 317f1f0b5cc92b3e66b584bd81aed826397d57a1 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Tue, 11 Mar 2025 09:53:54 +0100 Subject: [PATCH] Eyeo Adblock for Cromite: stricter verification for strict blocking (#1850) --- build/patches/Eyeo-Adblock-for-Cromite.patch | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/build/patches/Eyeo-Adblock-for-Cromite.patch b/build/patches/Eyeo-Adblock-for-Cromite.patch index 44f21de3..cd7898fa 100644 --- a/build/patches/Eyeo-Adblock-for-Cromite.patch +++ b/build/patches/Eyeo-Adblock-for-Cromite.patch @@ -59,7 +59,7 @@ deactivation of all pop-ups (default disabled) .../content/browser/element_hider_impl.cc | 9 +- .../browser/frame_hierarchy_builder.cc | 3 +- .../browser/resource_classification_runner.h | 9 + - .../resource_classification_runner_impl.cc | 83 +- + .../resource_classification_runner_impl.cc | 81 +- .../resource_classification_runner_impl.h | 10 + .../subscription_service_factory_base.cc | 11 +- .../subscription_service_factory_base.h | 1 + @@ -130,7 +130,7 @@ deactivation of all pop-ups (default disabled) .../blink/renderer/core/css/style_engine.h | 1 + .../renderer/core/exported/web_document.cc | 15 +- .../definitions/adblock_private.d.ts | 14 + - 120 files changed, 6729 insertions(+), 1313 deletions(-) + 120 files changed, 6727 insertions(+), 1313 deletions(-) create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.html create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.ts rename components/adblock/android/java/res/xml/{adblock_preferences.xml => eyeo_adblock_preferences.xml} (56%) @@ -3049,7 +3049,7 @@ diff --git a/components/adblock/content/browser/resource_classification_runner_i std::move(site_key)), base::BindOnce( &ResourceClassificationRunnerImpl::OnCheckResourceFilterMatchComplete, -@@ -260,9 +273,18 @@ ResourceClassificationRunnerImpl::CheckRequestFilterMatchInternal( +@@ -260,9 +273,16 @@ ResourceClassificationRunnerImpl::CheckRequestFilterMatchInternal( const scoped_refptr& resource_classifier, SubscriptionService::Snapshot subscription_collections, const GURL request_url, @@ -3058,17 +3058,15 @@ diff --git a/components/adblock/content/browser/resource_classification_runner_i ContentType adblock_resource_type, const SiteKey sitekey) { + std::vector aliases; -+ if (dns_aliases.size() <= 1) { -+ aliases.push_back(request_url.host()); -+ } else { -+ for (const std::string& alias : dns_aliases) -+ aliases.push_back(alias); ++ aliases.push_back(request_url.host()); ++ for (const std::string& alias : dns_aliases) { ++ aliases.push_back(alias); + } + TRACE_EVENT1("eyeo", "ResourceClassificationRunnerImpl::" "CheckRequestFilterMatchInternal", -@@ -270,26 +292,35 @@ ResourceClassificationRunnerImpl::CheckRequestFilterMatchInternal( +@@ -270,26 +290,35 @@ ResourceClassificationRunnerImpl::CheckRequestFilterMatchInternal( DVLOG(1) << "[eyeo] CheckRequestFilterMatchInternal start";