This directory contains:
This directory does not contain Android-specific implementations / extensions to APIs declared directly in
//base. Those live in
//base/*_android.cc, or behind
The advice laid out in //base/README.md applies to this directory as well. The bars for what APIs should exist and for code quality are generally higher than for other directories. If you find yourself wanting to add a new API, you should expect that code reviews take multiple revisions and that they be met with (respectful) scrutiny.
If you are not sure whether an API would make sense to add, you can ask via email@example.com. It is common to add APIs to
//chrome (or elsewhere) first, and move them into
//base after their usefulness has been proven.
The main two clients are Chrome and WebView, but it is also used by other Chromium-based apps, such as Chromecast and Chrome Remote desktop. Some
//base/android classes are used by
//build (this is a layering violation, tracked in crbug/1364192 and crbug/1377351).
Two considerations for WebView:
Here is a list of checks you should go through when adding a new API:
third_partylibraries, such as AndroidX.
All members of
//base/android/OWNERS will be CC'ed on reviews through a
//WATCHLIST entry. For new APIs, feel free to pick a reviewer at random. For modifying existing files, it is best to use a reviewer from prior changes to the file.