Commit 8508d80a authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Update history ui and ntp tiles for ephemeral Guest profiles.

Updates ntp_tiles_internals_ui.cc and history_ui.cc  for compatibility
with ephemeral Guest profiles.

This change is behind disabled |EnableEphemeralGuestProfilesOnDesktop|
flag.
Please see go/ephemeral-guest-profiles for more context.

Bug: 1125474
Change-Id: Ib538a3df1d3c547817f57473bd1d3cce85df0299
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461337Reviewed-by: default avatarcalamity <calamity@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816072}
parent 2374eacf
...@@ -120,7 +120,8 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) { ...@@ -120,7 +120,8 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) {
source->AddBoolean("allowDeletingHistory", allow_deleting_history); source->AddBoolean("allowDeletingHistory", allow_deleting_history);
source->AddBoolean(kShowMenuPromoKey, !MenuPromoShown(profile)); source->AddBoolean(kShowMenuPromoKey, !MenuPromoShown(profile));
source->AddBoolean("isGuestSession", profile->IsGuestSession()); source->AddBoolean("isGuestSession", profile->IsGuestSession() ||
profile->IsEphemeralGuestProfile());
source->AddBoolean(kIsUserSignedInKey, IsUserSignedIn(profile)); source->AddBoolean(kIsUserSignedInKey, IsUserSignedIn(profile));
......
...@@ -71,7 +71,8 @@ void ChromeNTPTilesInternalsMessageHandlerClient::RegisterMessages() { ...@@ -71,7 +71,8 @@ void ChromeNTPTilesInternalsMessageHandlerClient::RegisterMessages() {
bool ChromeNTPTilesInternalsMessageHandlerClient::SupportsNTPTiles() { bool ChromeNTPTilesInternalsMessageHandlerClient::SupportsNTPTiles() {
Profile* profile = Profile::FromWebUI(web_ui()); Profile* profile = Profile::FromWebUI(web_ui());
return !(profile->IsGuestSession() || profile->IsOffTheRecord()); return !(profile->IsGuestSession() || profile->IsEphemeralGuestProfile() ||
profile->IsOffTheRecord());
} }
bool ChromeNTPTilesInternalsMessageHandlerClient::DoesSourceExist( bool ChromeNTPTilesInternalsMessageHandlerClient::DoesSourceExist(
......
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