Chromium change:
https://chromium.googlesource.com/chromium/src/+/c68eea06abb338bf3a7a7782588b4fc77079d25e
commit c68eea06abb338bf3a7a7782588b4fc77079d25e
Author: Luc Nguyen <lucnguyen@google.com>
Date: Mon Jun 27 19:37:49 2022 +0000
Stop processing variation IDs defined in flags twice in Chrome browser
tl;dr: In Chrome Browser, variation IDs from about://flags are appended
to the command line in order for them to show up in about://version.
This has the effect that these variation IDs are processed twice in
`VariationsIdsProvider::ForceVariationIds()` (once from flags, and once
from the command line).
---
Work is underway in crrev/c/3628020 to prevent variation IDs from being
defined multiple times. I noticed only very recently that forcing a
flag in about://flags that had a variation ID would throw the error
that the ID was being redefined from the command line, despite not
doing so. Looking deeper, it is because variation IDs from flags are
being appended to the command line in Chrome browser. This is done in
`FlagsState::AddSwitchesToCommandLine()`. This has the effect that these
variation IDs are processed twice in
`VariationsIdsProvider::ForceVariationIds()` (once from flags, and once
from the command line).
This CL adds a parameter to
`VariationsFieldTrialCreator::SetUpFieldTrials` so that command line
variation IDs are passed as a parameter now, and we pass in the unedited
switch value (before they are modified by flags). For unaffected
platforms, we simply pass the value of the switch, i.e., a no-op.
Bug: 1294948