blob: 8e41b713ec5d7b1a03aa2deefb5071588bd4c054 [file] [log] [blame] [view]
Avi Drissmanf54d7ca2021-05-12 14:57:481# Chromium Flag Expiry
Elly Fong-Jonesd5c233a2019-07-29 19:48:272
Avi Drissmanf54d7ca2021-05-12 14:57:483ellyjones@ / avi@
4
5This document outlines the process by which flags in Chromium expire and are
6removed from the codebase. This document only describes entries in
7`chrome://flags`, *not* command-line switches (commonly also called command-line
8flags). This process does not cover command-line switches and there continue to
9be no guarantees about those.
10
11See also [Chromium Flag Ownership](flag_ownership.md).
Elly Fong-Jonesd5c233a2019-07-29 19:48:2712
13[TOC]
14
15## Do Not Depend On Flags
16
Elly Fong-Jones94fc8632019-08-14 18:23:0317If you are a user or administrator of Chrome and are using (or think you need to
18use) a flag to configure Chromium for your use case, please [file a bug] or
Avi Drissmanf54d7ca2021-05-12 14:57:4819email [flags-dev@], because that flag will likely be removed at some point. If
20you are a Chromium developer, please carry on using flags as normal :)
Elly Fong-Jonesd5c233a2019-07-29 19:48:2721
22Flags have never been a supported configuration surface in Chromium, and we have
23never guaranteed that any specific flag will behave consistently or even
24continue to exist. This document describes a process for removing flags that
25have been around for long enough that users *might* have come to rely on their
26ongoing existence in a way that hopefully minimizes pain, but Chromium
27developers are free to change the behavior of or remove flags at any time. In
28particular, just because a flag will expire through this process does not mean a
29developer will not remove it earlier than this process specifies.
30
31## The Process
32
Avi Drissmanf54d7ca2021-05-12 14:57:4833The logic in
34[`//tools/flags/generate_unexpire_flags.py`](../tools/flags/generate_unexpire_flags.py)
35implements most of this. At any given time, if the current value of `MAJOR` in
36[`//chrome/VERSION`](../chrome/VERSION) is *`$MSTONE`*, the two previous
37milestones (*`$MSTONE-1`* and *`$MSTONE-2`*) are considered recent.
Elly Fong-Jonesd5c233a2019-07-29 19:48:2738
Elly Fong-Jones7ff0bab2020-04-20 20:57:5139Then:
Avi Drissmanf54d7ca2021-05-12 14:57:48401) Flags whose expiration is *`$MSTONE`* or higher are not expired
412) Flags whose expiration is *`$MSTONE-3`* or lower are unconditionally expired
423) Flags whose expiration is *`$MSTONE-1`* or *`$MSTONE-2`* are expired by
43 default, but can be temporarily unexpired via flags named
44 "`temporary-unexpire-flags-M`*`$MSTONE`*".
Elly Fong-Jonesd5c233a2019-07-29 19:48:2745
46There are other elements of this process not described here, such as emails to
Avi Drissmanf54d7ca2021-05-12 14:57:4847[flags-dev@] tracking the status of the process.
Elly Fong-Jonesd5c233a2019-07-29 19:48:2748
Devlin Cronine73aec22020-09-03 15:22:5449Google employees: See more at
50[go/flags-expiry-process](http://goto.google.com/flags-expiry-process) and
51[go/chrome-flags:expiry-process](http://goto.google.com/chrome-flags:expiry-process).
52
53## Removing A Flag
54If a flag is no longer used (for instance, it was used to control a feature
55that has since launched), the flag should be removed. Delete the entry in
Avi Drissmandbaa3cd2021-05-13 16:07:3356[`//chrome/browser/about_flags.cc`](../chrome/browser/about_flags.cc) or
57[`//ios/chrome/browser/flags/about_flags.mm`](../ios/chrome/browser/flags/about_flags.mm)
58for iOS (and any corresponding entries for the flag description), and remove any
59references in
Avi Drissmanf54d7ca2021-05-12 14:57:4860[`//chrome/browser/flag-metadata.json`](../chrome/browser/flag-metadata.json).
Devlin Cronine73aec22020-09-03 15:22:5461
Avi Drissmanf54d7ca2021-05-12 14:57:4862## Removed Flags
Elly Fong-Jonesd5c233a2019-07-29 19:48:2763
Avi Drissmanf54d7ca2021-05-12 14:57:4864[https://crbug.com/953690](https://crbug.com/953690) is the never-to-be-closed
65bug to track flags that are removed.
Elly Fong-Jonesd5c233a2019-07-29 19:48:2766
Avi Drissmanf54d7ca2021-05-12 14:57:4867## I Have Questions
Elly Fong-Jonesd5c233a2019-07-29 19:48:2768
Avi Drissmanf54d7ca2021-05-12 14:57:4869Please get in touch with
70[`[email protected]`](https://groups.google.com/a/chromium.org/forum/#!forum/flags-dev).
71If you feel like you need to have a Google-internal discussion for some reason,
72there's also
73[`chrome-flags@`](https://groups.google.com/a/google.com/forum/#!forum/chrome-flags).
Elly Fong-Jones99d8cdad2019-08-27 15:48:4574
Avi Drissmanf54d7ca2021-05-12 14:57:4875## Relevant Source Files
76
77* [`//chrome/browser/about_flags.cc`](../chrome/browser/about_flags.cc)
78* [`//chrome/browser/flag-metadata.json`](../chrome/browser/flag-metadata.json)
79* [`//chrome/browser/flag-never-expire-list.json`](../chrome/browser/flag-never-expire-list.json)
80* [`//chrome/browser/expired_flags_list.h`](../chrome/browser/expired_flags_list.h)
Avi Drissmandbaa3cd2021-05-13 16:07:3381* [`//ios/chrome/browser/flags/about_flags.mm`](../ios/chrome/browser/flags/about_flags.mm)
Avi Drissmanf54d7ca2021-05-12 14:57:4882* [`//tools/flags/generate_expired_list.py`](../tools/flags/generate_expired_list.py)
83* [`//tools/flags/generate_unexpire_flags.py`](../tools/flags/generate_unexpire_flags.py)
Elly Fong-Jones99d8cdad2019-08-27 15:48:4584
Elly Fong-Jonesd5c233a2019-07-29 19:48:2785[file a bug]: https://new.crbug.com
Avi Drissmanf54d7ca2021-05-12 14:57:4886[flags-dev@]: https://groups.google.com/a/chromium.org/forum/#!forum/flags-dev