Quickstart

Get up and running with the eyeo Browser Ad-Filtering Solution.

About the eyeo Browser Ad-Filtering Solution

eyeo's Browser Ad-Filtering Solution is a software development kit that you can use to integrate eyeo's ad-filtering technology into Chromium-based browsers.

Maintained as a set of patches added to the Chromium project, the Solution lets you incorporate eyeo's ad-filtering functionality and filter lists into your own browser.

By the end of this quickstart guide, you'll have cloned the Solution's project and built Chromium with ad blocking for Linux.

This guide assumes familiarity with both Git and the command line.

Install depot_tools

Follow these steps to set up depot_tools:

  1. Clone the repository:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  1. Add depot_tools to your PATH:

export PATH="$PATH:/path/to/depot_tools"

When cloning depot_tools to your home directory do not use ~ on PATH, otherwise gclient runhooks will fail to run. Rather, you should use either $HOME or the absolute path:

export PATH="$PATH:${HOME}/depot_tools"

Warning: It is a good idea at this point to make sure that the gn command is pointing to depot_tools, as it is sometimes possible that a different instance of gn is present on the system:

whereis gn

The output of this command should only show:

gn: /path/to/depot_tools/gn

If there are any others listed in the output, delete them.

Get the eyeo Browser Ad-Filtering Solution code

Clone the eyeo Browser Ad-Filtering Solution repository using the following command:

mkdir chromium && cd chromium
git clone https://gitlab.com/eyeo/adblockplus/chromium-sdk src/

Expect the command to take 30 minutes on even a fast connection, and many hours on slower ones.

Update dependencies and build

  1. Create a .gclient configuration file relevant for your development platform:

Put one of these .gclient files into chromium/ (not chromium/src/):

solutions = [
  {
    "url": "https://chromium.googlesource.com/chromium/src.git",
    "managed": False,
    "name": "src",
    "deps_file": ".DEPS.git",
    "custom_deps": {},
  },
]
  1. Run gclient sync to update the third party dependencies of Chromium:

This steps downloads and sets up dependencies, in accordance with the .gclient file you created in the previous step.

gclient sync --force --reset --delete_unversioned_trees --no-history
  1. Set up the build:

Chromium uses Ninja as its main build tool along with a tool called GN to generate .ninja files. You can create any number of build directories with different configurations. To create a build directory, run:

cd src/
gn gen out/Default
  1. Build chromium with unit tests:

The following command builds chrome and unit tests:

autoninja -j X -C out/Default chrome components_unittests

where X should be an integer to represent how many jobs should be triggered on the build cluster, to ensure that your system is not overloaded with too many jobs running locally.

Depending on your hardware the build might take several hours to complete.

Run unit tests

You can run ad-filtering unit tests with the following command:

./out/Default/components_unittests --gtest_filter="*Adblock*"

For a more detailed build description and for building for other platforms follow Chromium's standard instructions.

Next up

In this quickstart guide, you cloned and built the eyeo Browser Ad-Filtering Solution and unit tests.

To test the ad-filtering capabilities of the browser see Testing

Check out the eyeo Browser Ad-Filtering Solution Features documentation to learn how the Solution handles common ad-filtering use cases.

Last updated