Commit 5df69caa authored by Tibor Goldschwendt's avatar Tibor Goldschwendt Committed by Chromium LUCI CQ

[ntp] Add flag to disable the logo (reland)

Makes the logo Finch-configurable. Flag is enabled by default.

This is a reland of 660b7591 with a fix
for the msan builder. See crbug/1169070 for more details.

Original change's info:
> Bug: 1168361
> Change-Id: Ie9fbeebb5f88fcf6ca2d6a418759f65e61d3231e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2639153
> Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
> Reviewed-by: Esmael Elmoslimany <aee@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#845490}

Bug: 1168361
Fixed: 1169070
Change-Id: I9f038b06cfd7551bf0acb94a7ac08cb8d49d7095
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643179
Auto-Submit: Tibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Esmael Elmoslimany <aee@chromium.org>
Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845896}
parent e45d23c1
...@@ -253,9 +253,13 @@ ...@@ -253,9 +253,13 @@
hidden$="[[!oneGoogleBarLoaded_]]"> hidden$="[[!oneGoogleBarLoaded_]]">
</ntp-iframe> </ntp-iframe>
</template> </template>
<!-- TODO(crbug.com/1168361): Instead of hidden$="[[!logoEnabled_]]" it would
be nicer to use a dom-if. However, that breaks
StartupBrowserCreatorPickerNoParamsTest.ShowPickerWhenAlreadyLaunched on
the msan builder. See crbug.com/1169070. -->
<ntp-logo id="logo" doodle-allowed$="[[doodleAllowed_]]" <ntp-logo id="logo" doodle-allowed$="[[doodleAllowed_]]"
single-colored$="[[singleColoredLogo_]]" dark="[[theme_.isDark]]" single-colored$="[[singleColoredLogo_]]" dark="[[theme_.isDark]]"
background-color="[[backgroundColor_]]"> background-color="[[backgroundColor_]]" hidden$="[[!logoEnabled_]]">
</ntp-logo> </ntp-logo>
<ntp-realbox id="realbox" on-open-voice-search="onOpenVoiceSearch_" <ntp-realbox id="realbox" on-open-voice-search="onOpenVoiceSearch_"
theme="[[theme_.searchBox]]" shown$="[[realboxShown_]]"> theme="[[theme_.searchBox]]" shown$="[[realboxShown_]]">
......
...@@ -190,6 +190,12 @@ class AppElement extends PolymerElement { ...@@ -190,6 +190,12 @@ class AppElement extends PolymerElement {
computed: 'computeRealboxShown_(theme_)', computed: 'computeRealboxShown_(theme_)',
}, },
/** @private */
logoEnabled_: {
type: Boolean,
value: () => loadTimeData.getBoolean('logoEnabled'),
},
/** @private */ /** @private */
shortcutsEnabled_: { shortcutsEnabled_: {
type: Boolean, type: Boolean,
......
...@@ -100,6 +100,8 @@ content::WebUIDataSource* CreateNewTabPageUiHtmlSource(Profile* profile) { ...@@ -100,6 +100,8 @@ content::WebUIDataSource* CreateNewTabPageUiHtmlSource(Profile* profile) {
base::FeatureList::IsEnabled(ntp_features::kWebUIThemeModeDoodles)); base::FeatureList::IsEnabled(ntp_features::kWebUIThemeModeDoodles));
source->AddBoolean("shortcutsEnabled", source->AddBoolean("shortcutsEnabled",
base::FeatureList::IsEnabled(ntp_features::kNtpShortcuts)); base::FeatureList::IsEnabled(ntp_features::kNtpShortcuts));
source->AddBoolean("logoEnabled",
base::FeatureList::IsEnabled(ntp_features::kNtpLogo));
source->AddBoolean( source->AddBoolean(
"middleSlotPromoEnabled", "middleSlotPromoEnabled",
base::FeatureList::IsEnabled(ntp_features::kNtpMiddleSlotPromo)); base::FeatureList::IsEnabled(ntp_features::kNtpMiddleSlotPromo));
......
...@@ -75,6 +75,9 @@ const base::Feature kWebUI{"NtpWebUI", base::FEATURE_ENABLED_BY_DEFAULT}; ...@@ -75,6 +75,9 @@ const base::Feature kWebUI{"NtpWebUI", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kWebUIThemeModeDoodles{"WebUIThemeModeDoodles", const base::Feature kWebUIThemeModeDoodles{"WebUIThemeModeDoodles",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
// If enabled, logo will be shown.
const base::Feature kNtpLogo{"NtpLogo", base::FEATURE_ENABLED_BY_DEFAULT};
// If enabled, shortcuts will be shown. // If enabled, shortcuts will be shown.
const base::Feature kNtpShortcuts{"NtpShortcuts", const base::Feature kNtpShortcuts{"NtpShortcuts",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
......
...@@ -26,6 +26,7 @@ extern const base::Feature kRealboxMatchOmniboxTheme; ...@@ -26,6 +26,7 @@ extern const base::Feature kRealboxMatchOmniboxTheme;
extern const base::Feature kRealboxUseGoogleGIcon; extern const base::Feature kRealboxUseGoogleGIcon;
extern const base::Feature kWebUI; extern const base::Feature kWebUI;
extern const base::Feature kWebUIThemeModeDoodles; extern const base::Feature kWebUIThemeModeDoodles;
extern const base::Feature kNtpLogo;
extern const base::Feature kNtpShortcuts; extern const base::Feature kNtpShortcuts;
extern const base::Feature kNtpMiddleSlotPromo; extern const base::Feature kNtpMiddleSlotPromo;
extern const base::Feature kModules; extern const base::Feature kModules;
......
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