Services and classes

This page lists the services and classes important to the eyeo Browser Ad-Filtering Solution, as well as the role each plays in the Solution's implementation.


The Solution consists of the following main KeyedService services:

  • FilteringConfiguration; allows the control of resource filtering settings

  • SubscriptionService; maintains a state of available subscriptions and synchronizes it with persistent storage.

  • ResourceClassificationRunner; decides whether to block or allow network requests.

  • ElementHider; applies element hiding scripts and stylesheets on web pages.

  • AdblockTelemetryService; reports anonymous usage statistics to eyeo.

  • SitekeyStorage; extracts, validates, and stores SiteKeys from response headers.

Important Chromium classes

The following Chromium classes play an important role in the Solution's implementation:

  • RenderFrameHost; allows finding the frame hierarchy and executes element hiding CSS and JavaScript.

  • WebContentsObserver; receives page load events and injects element hiding; extended by AdblockWebContentsObserver.

  • ChromeContentBrowserClient ; extended by AdblockChromeContentBrowserClient in order to set up an internal proxy for inspecting network requests.

Mapping to Chromium processes and threads

The Solution's logic executes primarily in the Browser process. The only exception is code under third_party/blink/renderer/core/exported/ that injects element hiding stylesheets into the website - this runs in a Renderer process.

In the Browser process, code that might take a long time to execute runs asynchronously in the ThreadPool. Examples of such code:

  • Classification of network requests

  • Preparing element hiding selectors

  • Conversion/serialization of filter lists

  • Loading installed filter lists from disk

Last updated