Understanding Chromium Flag Expiry: A Guide for Users and Developers
This article explains how Chromium flags expire and are removed from the codebase, focusing on entries in chrome://flags
. Command-line switches are not covered. This information helps both Chromium users and developers understand the lifecycle of these flags.
Why You Shouldn't Rely on Chromium Flags for Configuration
Chromium flags provide a way to test upcoming features that are under development. However, these flags are not intended as permanent configuration options. Relying on them can lead to unexpected behavior.
- Flags can change without notice.
- Flags may be removed entirely.
- Flags are not a supported configuration method.
Understanding the Flag Expiry Process in Chromium
The expiry process is mainly controlled by //tools/flags/generate_unexpire_flags.py
.
Here’s how the expiry process works, based on the current milestone ($MSTONE
) defined in //chrome/VERSION
:
- Active Flags: Flags set to expire in the current milestone (
$MSTONE
) or later will remain active. - Expired Flags: Flags set to expire three milestones ago (
$MSTONE-3
) or earlier are automatically expired. - Transitional Flags: Flags expiring in the last one to two milestones (
$MSTONE-1
or$MSTONE-2
) are expired, but can be temporarily revived with a "temporary-unexpire-flags-M$MSTONE
" flag.
This system allows Chromium developers to manage the flags and gives some flexibility during transitions.
How to Remove a Flag That’s No Longer Needed
Clean up unused flags to keep the codebase organized. Here's how to remove a flag:
- Locate the Flag: Find the flag's entry in
//chrome/browser/about_flags.cc
or//ios/chrome/browser/flags/about_flags.mm
(for iOS). - Remove the Entry: Delete this entry along with any related flag descriptions.
- Update Metadata: Remove any references to the flag in
//chrome/browser/flag-metadata.json
.
Tracking Removed Flags
All removals are tracked using a central bug:
Have Questions About Chromium Flags?
If you have questions or need clarification, reach out:
[email protected]
- Google Employees:
chrome-flags@
Key Chromium Source Files for Flag Management
Here is a list of important files related to Chromium flag management: