Skip to content

Commit

Permalink
[M103 Merge][ntp] Gate pride month hotfix behind a default-enabled fe…
Browse files Browse the repository at this point in the history
…ature flag

The feature flag gates a minor change that affects a specific subset
of pride month themes. This change needs to be available to all chrome users immediately following the M103 release and hence has been set
default enabled. The flag itself is intended to minimize risk for the
M103 merge given M103 is currently live on the Beta channel.

(cherry picked from commit 5d055ac)

Bug: 1329552
Change-Id: I1dda9dd35ac2324ad2d5e77efd57c18c3b0a25fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3680718
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Kristi Park <kristipark@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1009319}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3684190
Cr-Commit-Position: refs/branch-heads/5060@{#469}
Cr-Branched-From: b83393d-refs/heads/main@{#1002911}
  • Loading branch information
Tom Lukaszewicz authored and Chromium LUCI CQ committed Jun 1, 2022
1 parent 689baa0 commit de66d3d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chrome/browser/ui/webui/new_tab_page/new_tab_page_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ new_tab_page::mojom::ThemePtr MakeTheme(
// image. The first condition is necessary as a custom background image can be
// set while a GWS theme with a bundled image is concurrently enabled (see
// crbug.com/1329556 and crbug.com/1329552).
if (!custom_background.has_value() &&
if (base::FeatureList::IsEnabled(ntp_features::kCwsScrimRemoval) &&
!custom_background.has_value() &&
theme_provider->HasCustomImage(IDR_THEME_NTP_BACKGROUND)) {
if (ShouldForceDarkForegroundColorsForLogoAndOGB(theme_service)) {
theme->is_dark = false;
Expand Down
7 changes: 7 additions & 0 deletions components/search/ntp_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ const base::Feature kConfirmSuggestionRemovals{
const base::Feature kCacheOneGoogleBar{"CacheOneGoogleBar",
base::FEATURE_DISABLED_BY_DEFAULT};

// Enables the removal of the NTP background scrim and forced dark foreground
// colors for a specific subset of Chrome Web Store themes (see
// crbug.com/1329552). This is enabled by default to allow finch to disable this
// NTP treatment in the case of unexpected regressions.
const base::Feature kCwsScrimRemoval{"CwsScrimRemoval",
base::FEATURE_ENABLED_BY_DEFAULT};

// If enabled, "middle slot" promos on the bottom of the NTP will show a dismiss
// UI that allows users to close them and not see them again.
const base::Feature kDismissPromos{"DismissNtpPromos",
Expand Down
1 change: 1 addition & 0 deletions components/search/ntp_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace ntp_features {

extern const base::Feature kConfirmSuggestionRemovals;
extern const base::Feature kCacheOneGoogleBar;
extern const base::Feature kCwsScrimRemoval;
extern const base::Feature kDismissPromos;
extern const base::Feature kIframeOneGoogleBar;
extern const base::Feature kNtpRepeatableQueries;
Expand Down

0 comments on commit de66d3d

Please sign in to comment.