Closed Bug 2013888 Opened 4 months ago Closed 3 months ago

Add a prototype rich content blocking engine

Categories

(Core :: Privacy: Anti-Tracking, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: bvandersloot, Assigned: bvandersloot)

References

Details

Attachments

(5 files)

Let's vendor in Brave's crate for this and integrate it into our network code alongside the url-classifier.

This'll be pref-controlled and disabled by default, but will enable some fun playing around, foxfooding, and further development.

See the notes in the audit for zmij, flatbuffers, and seahash

This includes cbindings for the adblock-rust crate, and a clean C++
wrapper on top of it inside the content_classifier_engine folder.

Severity: -- → N/A
Priority: -- → P2
Assignee: nobody → bvandersloot
Status: NEW → ASSIGNED
Attachment #9541785 - Attachment description: WIP: Bug 2013888 - Vendor adblock, dependencies, and perform audit - WIP → Bug 2013888, part 1 - Vendor adblock, dependencies, and perform audit - r=#anti-tracking!
Attachment #9541786 - Attachment description: WIP: Bug 2013888 - The consequences of `./mach vendor rust` for adblock - WIP → Bug 2013888, part 2 - The consequences of `./mach vendor rust` for adblock - r=#anti-tracking!
Attachment #9541787 - Attachment description: WIP: Bug 2013888 - Implement a ContentClassifierService - WIP → Bug 2013888, part 3 - Implement a ContentClassifierService - r=#anti-tracking!
Attachment #9541788 - Attachment description: WIP: Bug 2013888 - Integrate the ContentClassifierService into the AsyncUrlChannelClassifier - WIP → Bug 2013888, part 4 - Integrate the ContentClassifierService into the AsyncUrlChannelClassifier - r=#anti-tracking!,#necko!
Pushed by bvandersloot@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/97fefedab167 https://hg.mozilla.org/integration/autoland/rev/03e8cdd3fa91 part 1 - Vendor adblock, dependencies, and perform audit - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/d5cdbdcad20b https://hg.mozilla.org/integration/autoland/rev/e5a2516607c5 part 2 - The consequences of `./mach vendor rust` for adblock - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/87b74f0555af https://hg.mozilla.org/integration/autoland/rev/9a936684164c part 3 - Implement a ContentClassifierService - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/e1d5070af1f5 https://hg.mozilla.org/integration/autoland/rev/d1648fdb7ff1 part 4 - Integrate the ContentClassifierService into the AsyncUrlChannelClassifier - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/44e99702ec24 https://hg.mozilla.org/integration/autoland/rev/2a3304f2016e part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang
Pushed by pstanciu@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/aa2d308b024a https://hg.mozilla.org/integration/autoland/rev/dca8ad259232 Revert "Bug 2013888, part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang" for causing build bustages @ContentClassifierEngine.h
Flags: needinfo?(bvandersloot)
Pushed by bvandersloot@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0a9b0f4c0351 https://hg.mozilla.org/integration/autoland/rev/4f175b09ba38 part 1 - Vendor adblock, dependencies, and perform audit - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/11df3a2cb002 https://hg.mozilla.org/integration/autoland/rev/b500fcc4db19 part 2 - The consequences of `./mach vendor rust` for adblock - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/a7a81f9af97f https://hg.mozilla.org/integration/autoland/rev/0ce914deea80 part 3 - Implement a ContentClassifierService - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/6ab0fd229d6f https://hg.mozilla.org/integration/autoland/rev/4fda9d5569d7 part 4 - Integrate the ContentClassifierService into the AsyncUrlChannelClassifier - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/a9c294aed26b https://hg.mozilla.org/integration/autoland/rev/851abe097265 part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/69a17580b41b https://hg.mozilla.org/integration/autoland/rev/92c463c187ea Revert "Bug 2013888, part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang" for causing failures @nsISupportsImpl.cpp.

Backed out for causing failures @nsISupportsImpl.cpp.

Pushed by bvandersloot@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a205888d9563 https://hg.mozilla.org/integration/autoland/rev/0de9d359ed07 part 1 - Vendor adblock, dependencies, and perform audit - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/dfb6f1231d71 https://hg.mozilla.org/integration/autoland/rev/12d2d0e2530d part 2 - The consequences of `./mach vendor rust` for adblock - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/814e795a4c9b https://hg.mozilla.org/integration/autoland/rev/7adfd8d1db4e part 3 - Implement a ContentClassifierService - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/57cbf298d183 https://hg.mozilla.org/integration/autoland/rev/a0db3c8dd8e4 part 4 - Integrate the ContentClassifierService into the AsyncUrlChannelClassifier - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/1cd96dba8ed8 https://hg.mozilla.org/integration/autoland/rev/f62eb288da13 part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/dc742cf10664 https://hg.mozilla.org/integration/autoland/rev/d9b7242a0716 Revert "Bug 2013888, part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang" for causing mochitests failures in browser_preferences_usage.js.

Reverted this because it was causing mochitests failures in browser_preferences_usage.js.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/base/content/test/performance/browser_preferences_usage.js | navigate_around - privacy.trackingprotection.content.annotation.enabled should not be accessed more than 40 times. - 51 <= 40

Resolving it by caching the pref on the service and throwing a couple of listeners on.

Flags: needinfo?(bvandersloot)
Pushed by bvandersloot@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a85988122f9e https://hg.mozilla.org/integration/autoland/rev/77311f4ef275 part 1 - Vendor adblock, dependencies, and perform audit - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/4eb40a107812 https://hg.mozilla.org/integration/autoland/rev/89de049aeeb7 part 2 - The consequences of `./mach vendor rust` for adblock - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/da9be8eb2cf2 https://hg.mozilla.org/integration/autoland/rev/8c8a62d15402 part 3 - Implement a ContentClassifierService - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/7ea39758a8fb https://hg.mozilla.org/integration/autoland/rev/7f82e24aa325 part 4 - Integrate the ContentClassifierService into the AsyncUrlChannelClassifier - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/c7407c0c4f59 https://hg.mozilla.org/integration/autoland/rev/28e4dcb1060f part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/aee35dcc4704 https://hg.mozilla.org/integration/autoland/rev/66b1974f5094 Revert "Bug 2013888, part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang" for causing failures at browser_content_classifier_blocking.js.
Pushed by bvandersloot@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d446bd604419 https://hg.mozilla.org/integration/autoland/rev/704935716b6a part 1 - Vendor adblock, dependencies, and perform audit - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/038f1a8cb635 https://hg.mozilla.org/integration/autoland/rev/4710f90be965 part 2 - The consequences of `./mach vendor rust` for adblock - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/2bae42e3a79f https://hg.mozilla.org/integration/autoland/rev/49f9984b77ca part 3 - Implement a ContentClassifierService - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/f18a80076e95 https://hg.mozilla.org/integration/autoland/rev/da89655ed18c part 4 - Integrate the ContentClassifierService into the AsyncUrlChannelClassifier - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/f49b6c3e8cc2 https://hg.mozilla.org/integration/autoland/rev/09e40f3fb54a part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang
Regressions: 2018232
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ab372edd44ed https://hg.mozilla.org/integration/autoland/rev/f8db8f8251ea Revert "Bug 2013888, part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang" for causing bc leaks @ StringBuffer

Backed out for causing leaks

That's what I get for using opt builds locally. Fixing the leak that had to do with how we integrated with the Rust crate.

Flags: needinfo?(bvandersloot)
Pushed by bvandersloot@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/dc1a0499cdeb https://hg.mozilla.org/integration/autoland/rev/1430c57ab77d part 1 - Vendor adblock, dependencies, and perform audit - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/ebb4662613fa https://hg.mozilla.org/integration/autoland/rev/a939a6d106e6 part 2 - The consequences of `./mach vendor rust` for adblock - r=supply-chain-reviewers,timhuang https://github.com/mozilla-firefox/firefox/commit/4f8dd4c968c5 https://hg.mozilla.org/integration/autoland/rev/642c558b3971 part 3 - Implement a ContentClassifierService - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/03ef76358532 https://hg.mozilla.org/integration/autoland/rev/5ccb6d82c916 part 4 - Integrate the ContentClassifierService into the AsyncUrlChannelClassifier - r=necko-reviewers,timhuang,jesup https://github.com/mozilla-firefox/firefox/commit/9a709bae3fa4 https://hg.mozilla.org/integration/autoland/rev/49132131843a part 5 - Validate annotation and blocking with the ContentClassifierService via the AsyncUrlChannelClassifier - r=timhuang
QA Whiteboard: [qa-triage-done-c150/b149]
See Also: → 1638808
Regressions: 2035852
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: