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; ...@@ -48,12 +48,15 @@ export let PrivacyPageVisibility;
export let pageVisibility; export let pageVisibility;
if (loadTimeData.getBoolean('isGuest')) { if (loadTimeData.getBoolean('isGuest')) {
const isEphemeralGuestProfile =
loadTimeData.getBoolean('isEphemeralGuestProfile');
// "if not chromeos" and "if chromeos" in two completely separate blocks // "if not chromeos" and "if chromeos" in two completely separate blocks
// to work around closure compiler. // to work around closure compiler.
// <if expr="not chromeos"> // <if expr="not chromeos">
pageVisibility = { pageVisibility = {
autofill: false, autofill: isEphemeralGuestProfile,
people: false, people: isEphemeralGuestProfile,
privacy: false, privacy: false,
onStartup: false, onStartup: false,
reset: false, reset: false,
......
...@@ -102,7 +102,8 @@ function createBrowserSettingsRoutes() { ...@@ -102,7 +102,8 @@ function createBrowserSettingsRoutes() {
r.SIGN_OUT.isNavigableDialog = true; r.SIGN_OUT.isNavigableDialog = true;
r.SEARCH = r.BASIC.createSection('/search', 'search'); 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.PEOPLE = r.BASIC.createSection('/people', 'people');
r.SYNC = r.PEOPLE.createChild('/syncSetup'); r.SYNC = r.PEOPLE.createChild('/syncSetup');
r.SYNC_ADVANCED = r.SYNC.createChild('/syncSetup/advanced'); r.SYNC_ADVANCED = r.SYNC.createChild('/syncSetup/advanced');
......
...@@ -190,7 +190,7 @@ void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) { ...@@ -190,7 +190,7 @@ void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) {
user_manager::UserManager::Get()->IsLoggedInAsGuest() || user_manager::UserManager::Get()->IsLoggedInAsGuest() ||
user_manager::UserManager::Get()->IsLoggedInAsPublicAccount()); user_manager::UserManager::Get()->IsLoggedInAsPublicAccount());
#else #else
profile->IsOffTheRecord()); profile->IsGuestSession() || profile->IsEphemeralGuestProfile());
#endif #endif
html_source->AddBoolean("isSupervised", profile->IsSupervised()); html_source->AddBoolean("isSupervised", profile->IsSupervised());
......
...@@ -281,6 +281,9 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) ...@@ -281,6 +281,9 @@ SettingsUI::SettingsUI(content::WebUI* web_ui)
"enableContentSettingsRedesign", "enableContentSettingsRedesign",
base::FeatureList::IsEnabled(features::kContentSettingsRedesign)); base::FeatureList::IsEnabled(features::kContentSettingsRedesign));
html_source->AddBoolean("isEphemeralGuestProfile",
profile->IsEphemeralGuestProfile());
#if defined(OS_WIN) #if defined(OS_WIN)
html_source->AddBoolean( html_source->AddBoolean(
"safetyCheckChromeCleanerChildEnabled", "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