Shipped and unshipped features in //media

2,093 views
Skip to first unread message

mark a. foltz

unread,
Oct 18, 2023, 2:24:33 PM10/18/23
to media-dev
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.

Dale Curtis

unread,
Oct 18, 2023, 3:20:24 PM10/18/23
to mark a. foltz, media-dev
Thanks for raising this Mark. I've also felt this is getting out of hand recently. I'm happy to help here. 

Your plan sgtm! I think we should probably do something similar for --regular-switches too.

- dale

--
You received this message because you are subscribed to the Google Groups "media-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to media-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/media-dev/CALgg%2BHFzDpmN-r2vDZtKmZnu2HcFR2XpJve9TTsKOQafbYivxw%40mail.gmail.com.

guest271314

unread,
Oct 18, 2023, 9:10:16 PM10/18/23
to mark a. foltz, media-dev
Willing to help where able. 

On Wed, Oct 18, 2023 at 11:24 AM mark a. foltz <mfo...@chromium.org> wrote:

mark a. foltz

unread,
Nov 27, 2023, 9:21:48 PM11/27/23
to guest271314, mark a. foltz, media-dev
I have a sheet with the inventory of the current features and a writeup of a process to remove features once we've decided what to do with them.

Committers have comment access on the writeup and can provide feedback and edit access to the sheet.

The next step is to decide what to do with features, which requires some analysis with codesearch.  I think a manual process is okay at this scale (236 features), but if someone has more skills with scripting codesearch and git blame, I could merge the output of a tool into the sheet.

m.



Dan Sanders

unread,
Nov 28, 2023, 1:27:07 PM11/28/23
to mark a. foltz, guest271314, media-dev
I went ahead and migrated the features I researched into your spreadsheet (media_switches.cc starting with kA and kB). I wanted to note though that I searched more thoroughly than the doc recommends; specifically:
  •   Many features are toggled by tests, I also searched for the feature identifier and name throughout Chromium and noted those as keep.
  •   Features may be in active or recent experiments, which requires searching google3.
  •   Some features are toggled for cast, cast testing, webview, etc. Some of these are in google3/chrome-internal.

Reply all
Reply to author
Forward
0 new messages