Skip to content

Commit

Permalink
Add field trial under enable-tab-grid-layout flag for M86 FastPath
Browse files Browse the repository at this point in the history
This CL adds the enable_launch_polish field trial and utility method for
M86 FastPath.

The utility method is added, so we can run the formal equivalence
checking tool.

Bug: 1124835
Change-Id: I7bb0152ebc4138f1023e8a8fe9715cf4524b5a1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2392773
Commit-Queue: Mei Liang <meiliang@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Yue Zhang <yuezhanggg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804490}
  • Loading branch information
Mei Liang authored and Commit Bot committed Sep 4, 2020
1 parent 0eccd3d commit 2cc375f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public class TabUiFeatureUtilities {
new BooleanCachedFieldTrialParameter(
ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID, SEARCH_CHIP_ADAPTIVE_PARAM, false);

private static final String LAUNCH_POLISH_PARAM = "enable_launch_polish";
public static final BooleanCachedFieldTrialParameter ENABLE_LAUNCH_POLISH =
new BooleanCachedFieldTrialParameter(
ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID, LAUNCH_POLISH_PARAM, false);

// Field trial parameter for the minimum Android SDK version to enable zooming animation.
private static final String MIN_SDK_PARAM = "zooming-min-sdk-version";
public static final IntCachedFieldTrialParameter ZOOMING_MIN_SDK =
Expand Down Expand Up @@ -183,4 +188,11 @@ public static boolean supportInstantStart(boolean isTablet) {
&& CachedFeatureFlags.isEnabled(ChromeFeatureList.INSTANT_START) && !isTablet
&& !StartSurfaceConfiguration.isStartSurfaceStackTabSwitcherEnabled();
}

/**
* @return Whether the Grid/Group launch polish is enabled.
*/
public static boolean isLaunchPolishEnabled() {
return ENABLE_LAUNCH_POLISH.getValue();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public void cacheNativeFlags() {
StartSurfaceConfiguration.TRENDY_FAILURE_MIN_PERIOD_MS,
StartSurfaceConfiguration.TRENDY_SUCCESS_MIN_PERIOD_MS,
TabContentManager.ALLOW_TO_REFETCH_TAB_THUMBNAIL_VARIATION,
TabUiFeatureUtilities.ENABLE_LAUNCH_POLISH,
TabUiFeatureUtilities.ENABLE_SEARCH_CHIP,
TabUiFeatureUtilities.ENABLE_SEARCH_CHIP_ADAPTIVE,
TabUiFeatureUtilities.ZOOMING_MIN_MEMORY,
Expand Down
3 changes: 2 additions & 1 deletion chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,8 @@ const FeatureEntry::FeatureParam kTabGridLayoutAndroid_NewTabTile[] = {
const FeatureEntry::FeatureParam kTabGridLayoutAndroid_TallNTV[] = {
{"thumbnail_aspect_ratio", "0.85"},
{"allow_to_refetch", "true"},
{"tab_grid_layout_android_new_tab", "NewTabVariation"}};
{"tab_grid_layout_android_new_tab", "NewTabVariation"},
{"enable_launch_polish", "true"}};

const FeatureEntry::FeatureParam kTabGridLayoutAndroid_SearchChip[] = {
{"enable_search_term_chip", "true"}};
Expand Down

0 comments on commit 2cc375f

Please sign in to comment.