Commit f354c627 authored by Huanzhong Huang's avatar Huanzhong Huang Committed by Commit Bot

Make two settings sections visible for ephemeral guest profiles

- Make the "You and Google" and "Auto-fill" sections visible,
when settings is based on an ephemeral guest profile.
- The notion of Ephemeral Guest profiles (go/ephemeral-guest-profiles)
is to be replacing the current guest profiles.

Bug: 1140419
Change-Id: If10584bb4a8105275c2eac8c581c7abccf545225
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2483753Reviewed-by: default avatardpapad <dpapad@chromium.org>
Commit-Queue: Huanzhong Huang <huanzhong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819350}
parent 47c83801
......@@ -48,12 +48,15 @@ export let PrivacyPageVisibility;
export let pageVisibility;
if (loadTimeData.getBoolean('isGuest')) {
const isEphemeralGuestProfile =
loadTimeData.getBoolean('isEphemeralGuestProfile');
// "if not chromeos" and "if chromeos" in two completely separate blocks
// to work around closure compiler.
// <if expr="not chromeos">
pageVisibility = {
autofill: false,
people: false,
autofill: isEphemeralGuestProfile,
people: isEphemeralGuestProfile,
privacy: false,
onStartup: false,
reset: false,
......
......@@ -102,7 +102,8 @@ function createBrowserSettingsRoutes() {
r.SIGN_OUT.isNavigableDialog = true;
r.SEARCH = r.BASIC.createSection('/search', 'search');
if (!loadTimeData.getBoolean('isGuest')) {
if (!loadTimeData.getBoolean('isGuest') ||
loadTimeData.getBoolean('isEphemeralGuestProfile')) {
r.PEOPLE = r.BASIC.createSection('/people', 'people');
r.SYNC = r.PEOPLE.createChild('/syncSetup');
r.SYNC_ADVANCED = r.SYNC.createChild('/syncSetup/advanced');
......
......@@ -190,7 +190,7 @@ void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) {
user_manager::UserManager::Get()->IsLoggedInAsGuest() ||
user_manager::UserManager::Get()->IsLoggedInAsPublicAccount());
#else
profile->IsOffTheRecord());
profile->IsGuestSession() || profile->IsEphemeralGuestProfile());
#endif
html_source->AddBoolean("isSupervised", profile->IsSupervised());
......
......@@ -281,6 +281,9 @@ SettingsUI::SettingsUI(content::WebUI* web_ui)
"enableContentSettingsRedesign",
base::FeatureList::IsEnabled(features::kContentSettingsRedesign));
html_source->AddBoolean("isEphemeralGuestProfile",
profile->IsEphemeralGuestProfile());
#if defined(OS_WIN)
html_source->AddBoolean(
"safetyCheckChromeCleanerChildEnabled",
......
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