Commit 09c5916e authored by Henrique Nakashima's avatar Henrique Nakashima Committed by Commit Bot

Homogenize caching and checking of flags in FeatureUtilities.

This a step to make FeatureUtilities easier to maintain.

- Move most static variables in FeatureUtilities to a static Map.
- Deduplicate code into isFlagEnabledWithDefaultFalse(),
isFlagEnabledWithDefaultTrue(), and cacheFlag()
- Keep the public API intact for now

This is not a final solution, but it highlights the quirks in each
usage so they can be clearly refactored out, and makes it easier to
migrate to the solution we decide for.

Bug: 1012975
Change-Id: Id155ec60dbcb1170ef39bc6e3f1b759ef7b63692
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850820
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704864}
parent 90f5556e
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment