0
Go to file
Elly Fong-Jones 99d8cdad66 flags: flag expiration support, take 2
This change implements flag expiration, with the same goal but a very
different method than the previous implementation
(https://chromium-review.googlesource.com/c/chromium/src/+/1729449).

This change preserves the flag-metadata.json file as the sole
authoritative source for flag expiration data. During the build process,
a new script (//tools/flags/generate_expired_list.py) generates a data
structure from flag-metadata.json listing flags that are expired at or
before the current milestone, with their expiration milestones. Logic in
//chrome/browser/about_flags.cc and //chrome/browser/unexpire_flags.cc
then conditionally hides these flags, depending on the state of the
unexpire flags - see //doc/flag_expiry.md for details about those.

Specifically, this change:
1) Renames //tools/flags/list-flags.py to list_flags.py to make it
   importable as a module;
2) Introduces //chrome/browser/expired_flags_list.h, which describes a
   data structure for representing expired flags;
3) Introduces //tools/flags/generate_expired_list.py, which takes as
   inputs //chrome/browser/flag-metadata.json and //chrome/VERSION and
   generates a C++ source file containing a data structure matching that
   in expired_flags_list.h;
4) Has the //chrome/browser build target depend on the generated file
   from step 3;
5) Re-introduces an unexpire flag as described in //doc/flag_expiry.md;
6) Adds logic to //chrome/browser/about_flags.cc to conditionally hide
   expired flags.

This means that flag-metadata.json is the sole determinant of whether a
flag is currently expired or not.

Note that this change expires all flags whose expiration milestones were
*M76* or earlier, not M78 (the current mstone); this is because the
backlog of flags to expire is currently quite large. In M79, we will
expire flags <= M78, then in M80, we will expire flags <= M80; after
that, each milestone Mx will expire flags <= Mx.

Also note that this change discards the notion of flag expiry depending
on usage metrics - i.e., we will now expire *all* flags that expire
before the target milestone, not just the N with the lowest usage. The
lowest-usage design proved to be extremely manual to implement and very
difficult for developers to predict the results of.

Bug: 953690
Change-Id: I7389b667d1e032c795c137cafadf0e5e80fb82c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1754762
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690742}
2019-08-27 15:48:45 +00:00
2019-07-25 00:36:17 +00:00
2019-08-25 03:12:42 +00:00

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure .

Description
Chromium是一个开源浏览器项目,提供了一种安全、快速、稳定的方法来体验Web。该浏览器可以在多个平台上下载,包括Mac、Windows、Linux和ChromiumOS。项目原始地址: https://chromium.googlesource.com/chromium/src.git
https://www.mobibrw.com/gitea-mirrors/chromium/src.git
Readme BSD-3-Clause 89 GiB
Languages
C++ 74.4%
Java 8.2%
Objective-C++ 4.6%
TypeScript 4%
Python 2.5%
Other 6.1%