Commit f4d42be0 authored by James Cook's avatar James Cook Committed by Commit Bot

chromeos: Don't show OS settings banner if SplitSettings is disabled

SplitSettings is on-by-default. However, if we have to turn it off, we
don't want the combined settings page to show the promo banner linking
to OS settings (which won't exist).

Test: Run chrome --disable-features=SplitSettings with an empty user
data directory. Open settings. No promo banner shown.

Bug: 1000307
Change-Id: If87d7cf3049353a2a1a322c042adb4bfa886f462
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1785478
Auto-Submit: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693424}
parent 6ab72db6
......@@ -236,6 +236,11 @@ Polymer({
if (!this.prefs || !this.currentRoute_) {
return;
}
// Don't show the banner when SplitSettings is disabled (and hence this page
// is already showing OS settings).
if (loadTimeData.getBoolean('showOSSettings')) {
return false;
}
const showPref = /** @type {boolean} */ (
this.getPref('settings.cros.show_os_banner').value);
......
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