Ideally there should be a single function IsFeatureEnabled() which
checks the flag, and then you just have to change this single
function. That's how I did this for all the features that went from
off-by-default to on-by-default. Is this not feasible in your case?
Nico
> and
> inverting its logic. If not, perhaps we can add something to browser_main
> that modifies the current command line, like about:flags does. Maybe even
> better would be to just to check the about:flags box by default, but still
> allow a user to disable it.
>
> -- Evan Stade
>
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>
In some places I've seen a refactoring like:
bool FoobarEnabled() {
// old code: return ...GetSwitch(FoobarEnabled);
// new code: return !...GetSwitch(FoobarDisabled);
}
That way the call sites don't need to be changed when you change
between these behaviors.
--
Can't you use SINGLE_VALUE_TYPE_AND_VALUE, to set your initial value in the kExperiments array?