Quickstart (Browser Ad-Filtering Solution)
About the eyeo Browser Ad-Filtering Solution
The eyeo Browser Ad-Filtering Solution is a software development kit for integrating ad-filtering technology into Chromium-based browsers. Maintained as patches to the Chromium project, it enables developers to incorporate eyeo's filtering functionality and filter lists into custom browsers.
By completing this guide, you'll clone the Solution's project and build Chromium with ad blocking for Linux.
This guide assumes familiarity with both Git and the command line.
Install depot_tools
Clone the repository
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Add depot_tools to your PATH
export PATH="$PATH:/path/to/depot_tools"
Important note: Avoid using ~ in PATH, as this will cause gclient runhooks to fail. Use $HOME or absolute paths instead:
export PATH="$PATH:${HOME}/depot_tools"
Warning: Verify the gn command points to depot_tools:
whereis gn
Output should show only: gn: /path/to/depot_tools/gn. Delete any other instances found.
Get the eyeo Browser Ad-Filtering Solution code
Clone the repository:
mkdir chromium && cd chromium
git clone https://gitlab.com/eyeo/adblockplus/chromium-sdk src/
Expect 30 minutes on fast connections; significantly longer on slower ones.
Update dependencies and build
Step 1: Create a .gclient configuration file
Place the appropriate .gclient file in chromium/ (not chromium/src/):
Linux development:
solutions = [
{
"url": "https://chromium.googlesource.com/chromium/src.git",
"managed": False,
"name": "src",
"deps_file": ".DEPS.git",
"custom_deps": {},
},
]
Android development:
solutions = [
{
"url": "https://chromium.googlesource.com/chromium/src.git",
"managed": False,
"name": "src",
"deps_file": ".DEPS.git",
"custom_deps": {},
},
]
target_os = ["android"]
Windows development:
solutions = [
{
"url": "https://chromium.googlesource.com/chromium/src.git",
"managed": False,
"name": "src",
"deps_file": ".DEPS.git",
"custom_deps": {},
},
]
target_os = ["win"]
Step 2: Run gclient sync
gclient sync --force --reset --delete_unversioned_trees --no-history
This downloads and configures dependencies per your .gclient file.
Step 3: Set up the build
cd src/
gn gen out/Default
Chromium uses Ninja as its build tool with GN generating .ninja files. Multiple build directories with different configurations are possible.
Step 4: Build chromium with unit tests
autoninja -j X -C out/Default chrome components_unittests
Replace X with an integer representing parallel jobs to prevent system overload. Builds typically require several hours depending on hardware.
Run unit tests
Execute ad-filtering unit tests:
./out/Default/components_unittests --gtest_filter="*Adblock*"
For detailed build descriptions and other platforms, consult Chromium's standard instructions.
Next steps
You've successfully cloned and built the eyeo Browser Ad-Filtering Solution with unit tests. For testing ad-filtering capabilities, see the testing documentation. Explore the features documentation to understand how the Solution addresses common ad-filtering scenarios.