Commit 9a3fb38a authored by Yue Li's avatar Yue Li Committed by Commit Bot

Redirect Assistant settings url when Assistant disabled

Bug: 935928
Test: Local Build
Change-Id: I397d5f118d6dfbfdcd8b1b318e552780068560da
Reviewed-on: https://chromium-review.googlesource.com/c/1490114Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Yue Li <updowndota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636124}
parent e5f30530
......@@ -264,7 +264,10 @@ cr.define('settings', function() {
r.SEARCH = r.BASIC.createSection('/search', 'search');
r.SEARCH_ENGINES = r.SEARCH.createChild('/searchEngines');
// <if expr="chromeos">
r.GOOGLE_ASSISTANT = r.SEARCH.createChild('/googleAssistant');
if (loadTimeData.valueExists('assistantEnabled') &&
loadTimeData.getBoolean('assistantEnabled')) {
r.GOOGLE_ASSISTANT = r.SEARCH.createChild('/googleAssistant');
}
r.ANDROID_APPS = r.BASIC.createSection('/androidApps', 'androidApps');
r.ANDROID_APPS_DETAILS = r.ANDROID_APPS.createChild('/androidApps/details');
......
......@@ -339,6 +339,9 @@ MdSettingsUI::MdSettingsUI(content::WebUI* web_ui)
html_source->AddBoolean("isDemoSession",
chromeos::DemoSession::IsDeviceInDemoMode());
html_source->AddBoolean("assistantEnabled",
chromeos::switches::IsAssistantEnabled());
// We have 2 variants of Android apps settings. Default case, when the Play
// Store app exists we show expandable section that allows as to
// enable/disable the Play Store and link to Android settings which is
......
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