CARVIEW |
Select Language
HTTP/2 301
content-security-policy: script-src 'sha256-1az3CiAdXAaMP3TFl5msfrDjNuSHMdg1ecAgxfZPR50=' 'unsafe-inline' 'strict-dynamic'; object-src 'none'; base-uri 'none'; report-uri https://csp.withgoogle.com/csp/chromium-website/
location: https://www.chromium.org/developers/design-documents/experiments
content-type: text/plain; charset=utf-8
accept-ranges: bytes
date: Sun, 12 Oct 2025 00:25:36 GMT
x-served-by: cache-bom-vanm7210083-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760228736.883986,VS0,VE118
vary: x-fh-requested-host, accept-encoding
alt-svc: h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
content-length: 79
HTTP/2 301
content-security-policy: script-src 'sha256-1az3CiAdXAaMP3TFl5msfrDjNuSHMdg1ecAgxfZPR50=' 'unsafe-inline' 'strict-dynamic'; object-src 'none'; base-uri 'none'; report-uri https://csp.withgoogle.com/csp/chromium-website/
location: /developers/design-documents/experiments/
content-type: text/plain; charset=utf-8
accept-ranges: bytes
date: Sun, 12 Oct 2025 00:25:36 GMT
x-served-by: cache-bom-vanm7210027-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760228736.058656,VS0,VE123
vary: x-fh-requested-host, accept-encoding
alt-svc: h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
content-length: 56
HTTP/2 200
cache-control: max-age=3600
content-encoding: gzip
content-security-policy: script-src 'sha256-1az3CiAdXAaMP3TFl5msfrDjNuSHMdg1ecAgxfZPR50=' 'unsafe-inline' 'strict-dynamic'; object-src 'none'; base-uri 'none'; report-uri https://csp.withgoogle.com/csp/chromium-website/
content-type: text/html; charset=utf-8
etag: "514a2078ae1dad00a6fd3d34da4786f6bdf7910726d5d002e6ee9c9b6c4a66bd"
last-modified: Fri, 10 Oct 2025 02:31:02 GMT
strict-transport-security: max-age=31556926
accept-ranges: bytes
date: Sun, 12 Oct 2025 00:25:36 GMT
x-served-by: cache-bom-vanm7210027-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760228736.195308,VS0,VE196
vary: x-fh-requested-host, accept-encoding
alt-svc: h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
content-length: 2308
Experiments

The Chromium Projects
Experiments
Here's how to hide a feature behind a flag that can be changed from the
chrome://flags
page in Chrome, or with a command line flag. We'll use an
example from the following revision
84971 which
hides the compact navigation bar behind such a flag.
- First, you need to add a string for your command line switch. For example: chrome_switches.h & chrome_switches.cc
- Then you need strings to be displayed on the
chrome://flags
page for the name and description of your experiment. For example, the two strings with IDs starting with IDS_FLAGS_ENABLE in: generated_resources.grd - And then add all this info to a new entry in the Experiments array. For
example:
about_flags.cc
- The first string (e.g., "compact-navigation") is an identifier for the
preference that will be saved in the user profile based on the settings
chosen by the user on the
chrome://flags
page. - The the resource IDs for the name and description strings.
- Then which OS should expose it.
- And finally, the access to the command line flag, using one of the following macros:
- SINGLE_VALUE_TYPE_AND_VALUE, SINGLE_VALUE_TYPE, or MULTI_VALUE_TYPE.
- The first string (e.g., "compact-navigation") is an identifier for the
preference that will be saved in the user profile based on the settings
chosen by the user on the
- And finally, use the CommandLine::ForCurrentProcess()->HasSwitch(<your flag>) to check its state. For example: tab_menu_model.cc uses it to decide whether we show the Hide toolbar option in the tab contextual menu or not.