PSA: runtime_enabled_features.json5 improvements

373 views
Skip to first unread message

TAMURA, Kent

unread,
Sep 14, 2022, 7:19:47 PM9/14/22
to blink-dev
* blink::WebRuntimeFeatures methods generation

You can generate methods of blink::WebRuntimeFeatures for a feature entry in runtime_enabled_features.json5 by adding `public: true,`.

* base::Feature generation

You can generate a base::Feature instance in blink::features namespace for a feature entry in runtime_enabled_features.json5 by adding `base_feature: "feature-name",`.

You can't use it for a base::Feature not in blink::features.



--
TAMURA Kent
Software Engineer, Google


Ian Clelland

unread,
Sep 17, 2022, 12:52:59 PM9/17/22
to TAMURA, Kent, blink-dev, experimentation-dev
I ran into one of these in the wild, in a code review yesterday. It's a huge win for reducing boilerplate code for new features (especially those entering an Origin Trial, which usually need extra browser flags over and above whatever blink-side control they already implement)

Thanks for doing this!

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

Yoav Weiss

unread,
Sep 18, 2022, 5:15:51 AM9/18/22
to Ian Clelland, TAMURA, Kent, blink-dev, experimentation-dev
That's amazing! Thank you for reducing the amount of boilerplate and hoops Chromium devs have to jump through to enable experimentation!!

Reply all
Reply to author
Forward
0 new messages