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:Matthew Jones <mdjones@chromium.org> Reviewed-by:
Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#704864}
Showing
This diff is collapsed.
Please register or sign in to comment