Cache Tab UI flags using cacheNativeFlags().
Refactoring the logic for caching Tab UI flags in the following ways: - TabManagementModuleProvider.isTabManagementModuleSupported() is not cached anymore, either to prefs or in memory. - When DeviceClassManager.enableAccessibilityLayout() is true, the flags are not cached as false. That is equivalent since the default return value and the cached value in this case match (both false). Not having to specify both reduces the risk of inconsistency when the code is changed. - Features are referenced by name from ChromeFeatureList, not prefs key from ChromePreferenceKeys. A follow up CL will move this logic to TabUiFeatureUtilities and inline many of the methods into clients. I kept this CL small so it is easier to review. Bug: 1012975 Change-Id: I8f9d7ad3d3b935064e568bc8561d6336e44839b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063416Reviewed-by:Wei-Yin Chen (陳威尹) <wychen@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Cr-Commit-Position: refs/heads/master@{#744328}
Showing
Please register or sign in to comment