I have been starting to look at the backlog of base::Features in media_switches.h. Right now there are 187 which is quite a lot. I don't think we are launching 187 things at once, and the code would benefit from cleaning up these features, both to remove dead code and reduce the state space of the overall system.
Here is what I am thinking for different categories of features:
Enabled by default everywhere for some time: Delete feature and disabled codepaths
Disabled by default everywhere, abandoned: Delete feature and enabled codepaths
In the process of shipping (experiments, developer testing, has a UI flag, etc.): Leave as-is
Enabled on some platforms and disabled on other platforms:
- Add an IsFooEnabled() method and convert code to call IsFooEnabled() instead of the base::Feature.
- Return true for enabled platforms.
- For disabled platforms, either return false or delegate to the base::Feature if it may be shipped in the future.
I will likely need some help in identifying what to do with specific features, and have not thought through the process yet for coordinating contributions. I may set up a spreadsheet. If you are a feature owner, feel free to pitch in.
m.