0

docs: Show file specific rules for adding a new flag

There are a few files where the rules to add a new feature are hard to
find, resulting in people adding their features randomly. Therefore, it
could be better if the specific rules are specified in this main doc.

Bug: None
Change-Id: I9d68fea2cdc4536466e0af6a76b834e947522a28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5773139
Reviewed-by: Andrew Moylan <amoylan@google.com>
Reviewed-by: Ming-Ying Chung <mych@chromium.org>
Commit-Queue: Cristian Ciacu <cristianciacu@google.com>
Cr-Commit-Position: refs/heads/main@{#1339513}
This commit is contained in:
Cristian Ciacu
2024-08-09 08:09:43 +00:00
committed by Chromium LUCI CQ
parent 308ba1d83e
commit 5470b4ed7f

@ -14,6 +14,10 @@ See also the following for definitions:
## Step 1: Adding a new `base::Feature`
*** note
**NOTE:** All files mentioned in Step 1 require the features to be listed in alphabetical order.
***
This step would be different depending on where you want to use the flag:
### To use the Flag in `content/` and its embedders
@ -79,9 +83,9 @@ for WebView flags.
You have to modify these five files in total.
* [chrome/browser/about_flags.cc](https://cs.chromium.org/chromium/src/chrome/browser/about_flags.cc)
* [chrome/browser/flag_descriptions.cc](https://cs.chromium.org/chromium/src/chrome/browser/flag_descriptions.cc)
* [chrome/browser/flag_descriptions.h](https://cs.chromium.org/chromium/src/chrome/browser/flag_descriptions.h)
* [chrome/browser/about_flags.cc](https://cs.chromium.org/chromium/src/chrome/browser/about_flags.cc) (Add your changes at the bottom of the list)
* [chrome/browser/flag_descriptions.cc](https://cs.chromium.org/chromium/src/chrome/browser/flag_descriptions.cc) (Features should be alphabetically sorted)
* [chrome/browser/flag_descriptions.h](https://cs.chromium.org/chromium/src/chrome/browser/flag_descriptions.h) (Features should be alphabetically sorted)
* [tools/metrics/histograms/enums.xml](https://cs.chromium.org/chromium/src/tools/metrics/histograms/enums.xml)
* [chrome/browser/flag-metadata.json](https://cs.chromium.org/chromium/src/chrome/browser/flag-metadata.json)