commit | c9767642d56fcc207fe5ac586535463bfaf66bd5 | [log] [tgz] |
---|---|---|
author | Peter Kasting <pkasting@chromium.org> | Thu Jun 02 14:37:23 2022 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Jun 02 15:01:26 2022 |
tree | 361f52dd5c758fcabad99cfb558b6dd18080df6d | |
parent | f10a4cbe064ced29743e7ff675d21681454f1c64 [diff] |
Revert "Revert "Prevent unsafe narrowing: base/*/*"" This reverts commit 16934145bc49be128ade0ebb050c984b83904b6c. Bug: 1292951 Change-Id: Ic3f1f7b764a0ba53a6abe5b8688bd5d024b2fd1b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3682678 Auto-Submit: Peter Kasting <pkasting@chromium.org> Reviewed-by: danakj <danakj@chromium.org> Commit-Queue: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/main@{#1010085} NOKEYCHECK=True GitOrigin-RevId: ddf17a0a0da5feae6f13d5f6afaaff6e1c33bb0e
Contains a written down set of principles and other information on //base. Please add to it!
Chromium is a very mature project. Most things that are generally useful are already here and things not here aren't generally useful.
The bar for adding stuff to base is that it must have demonstrated wide applicability. Prefer to add things closer to where they're used (i.e. “not base”), and pull into base only when needed. In a project our size, sometimes even duplication is OK and inevitable.
Adding a new logging macro DPVELOG_NE
is not more clear than just writing the stuff you want to log in a regular logging statement, even if it makes your calling code longer. Just add it to your own code.
If the code in question does not need to be used inside base, but will have multiple consumers across the codebase, consider placing it in a new directory under components/ instead.
base is written for the Chromium project and is not intended to be used outside it. Using base outside of src.git is explicitly not supported, and base makes no guarantees about API (or even ABI) stability (like all other code in Chromium). New code that depends on base/ must be in src.git. Code that's not in src.git but pulled in through DEPS (for example, v8) cannot use base.
Owners are added when a contributor has shown the above qualifications and when they express interest. There isn't an upper bound on the number of OWNERS.
Since the primitives provided by //base are used very widely, it is important to ensure they scale to the necessary workloads and perform well under all supported platforms. The base_perftests
target is a suite of synthetic microbenchmarks that measure performance in various scenarios:
Regressions in these benchmarks can generally by caused by 1) operating system changes, 2) compiler version or flag changes or 3) changes in //base code itself.