Skip to content

Add CloakedCnameDetector and TrackerDataDownloader to the api - #9801

Merged
aibrahim- merged 1 commit into
feature/aibrahim/tracker-detection/phase2-entity-lookupfrom
feature/aibrahim/tracker-detection/phase2-cname-downloader-api
Sep 23, 2026
Merged

aibrahim- merged 1 commit into
feature/aibrahim/tracker-detection/phase2-entity-lookupfrom
feature/aibrahim/tracker-detection/phase2-cname-downloader-api

Conversation

@aibrahim-

Copy link
Copy Markdown
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/task/1216988666467280
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/task/1216706645739239
API Proposals URL(s) (if applicable): to follow — will be added before merge

Description

Phase 2 of the tracker-detection extraction. No behaviour change.

  • CloakedCnameDetector's interface moves out of :app into tracker-detection-api, keeping its package so WebViewRequestInterceptor needs no import change. CloakedCnameRefresher deliberately stays next to the implementation: its only consumer is TrackerDataLoader, so it travels with the impl rather than becoming public surface.
  • TrackerDataDownloader becomes an interface in the api, mirroring the existing HttpsUpgradeDataDownloader (same Completable shape, and httpsupgrade-api is the precedent for rxjava in an api module). The interface keeps the legacy FQN so AppConfigurationDownloader, BlockList and TrackerDataDevReceiver are untouched; the concrete class becomes RealTrackerDataDownloader, bound with @ContributesBinding.

Steps to test this PR

TDS still downloads and CNAME cloaking is still detected

  • Build and run an internal build
  • Dev settings → trigger a tracker data (TDS) download and confirm it completes without error
  • Visit a site known to use CNAME-cloaked trackers and confirm they are still blocked in the privacy dashboard

UI changes

Before After
No UI changes No UI changes

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ API Proposal reminder

This PR changes the public surface of one or more -api modules, but the API Proposals field of the PR description is empty. This is a non-blocking reminder — please double-check whether a proposal is needed.

Changed -api source files:

  • tracker-detection/tracker-detection-api/src/main/java/com/duckduckgo/app/trackerdetection/CloakedCnameDetector.kt
  • tracker-detection/tracker-detection-api/src/main/java/com/duckduckgo/app/trackerdetection/api/TrackerDataDownloader.kt

To clear this reminder, edit the PR description and either:

  • add the approved API Proposal link(s) in the API Proposals field (one per line), or
  • write None there if this PR does not change the public API (e.g. KDoc, comments, tests).

See the API Proposals section in .claude/docs/contributions.md for details.

@aibrahim-
aibrahim- added this pull request to stack #9805 September 17, 2026 10:20
@aibrahim-
aibrahim- force-pushed the feature/aibrahim/tracker-detection/phase2-cname-downloader-api branch from 87a1b2c to 3f62389 Compare September 17, 2026 10:28
@aibrahim-
aibrahim- marked this pull request as ready for review September 21, 2026 13:12

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

CloakedCnameDetector's interface moves out of :app into
tracker-detection-api, keeping its package so WebViewRequestInterceptor
needs no import change. CloakedCnameRefresher stays next to the
implementation: it is only used by TrackerDataLoader and travels with
the impl rather than the public surface.

TrackerDataDownloader becomes an interface in the api, mirroring
HttpsUpgradeDataDownloader. The interface keeps the legacy FQN so
AppConfigurationDownloader, BlockList and TrackerDataDevReceiver are
untouched; the concrete class becomes RealTrackerDataDownloader and is
bound with @ContributesBinding.

Asana: https://app.asana.com/1/137249556945/task/1216988666467280

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aibrahim-
aibrahim- force-pushed the feature/aibrahim/tracker-detection/phase2-cname-downloader-api branch from 3f62389 to 2366e26 Compare September 22, 2026 10:09
@aibrahim-
aibrahim- requested a review from landomen September 22, 2026 16:15
@landomen landomen self-assigned this Sep 23, 2026
@aibrahim-
aibrahim- added this pull request to the merge queue Sep 23, 2026
Merged via the queue into develop with commit d21c463 Sep 23, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants