Commit fc9ff1b4 authored by Ramin Halavati's avatar Ramin Halavati Committed by Chromium LUCI CQ

Change ephemeral Guest profiles NTP to be the same as OTR Guest profiles.

Ephemeral Guest profiles will have the same new tab page as the off-the-
record Guest profiles in the first experiments.

Please see go/ephemeral-guest-profiles for more context.

Bug: 1134111
Change-Id: I5682db9576abb7575b09903a8c2633cdccdd5f87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2580784
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835576}
parent ce94808f
...@@ -219,7 +219,11 @@ NTPResourceCache::WindowType NTPResourceCache::GetWindowType( ...@@ -219,7 +219,11 @@ NTPResourceCache::WindowType NTPResourceCache::GetWindowType(
} }
base::RefCountedMemory* NTPResourceCache::GetNewTabGuestHTML() { base::RefCountedMemory* NTPResourceCache::GetNewTabGuestHTML() {
if (!profile_->IsEphemeralGuestProfile()) { // TODO(crbug.com/1134111): For full launch of ephemeral Guest profiles,
// instead of the below code block, use IdentityManager for ephemeral Guest
// profiles to check sign in status and return either
// |CreateNewTabEphemeralGuestSignedInHTML()| or
// |CreateNewTabEphemeralGuestSignedOutHTML()|.
if (!new_tab_guest_html_) { if (!new_tab_guest_html_) {
GuestNTPInfo guest_ntp_info{kLearnMoreGuestSessionUrl, IDR_GUEST_TAB_HTML, GuestNTPInfo guest_ntp_info{kLearnMoreGuestSessionUrl, IDR_GUEST_TAB_HTML,
IDS_NEW_TAB_GUEST_SESSION_HEADING, IDS_NEW_TAB_GUEST_SESSION_HEADING,
...@@ -228,14 +232,6 @@ base::RefCountedMemory* NTPResourceCache::GetNewTabGuestHTML() { ...@@ -228,14 +232,6 @@ base::RefCountedMemory* NTPResourceCache::GetNewTabGuestHTML() {
} }
return new_tab_guest_html_.get(); return new_tab_guest_html_.get();
}
// TODO(crbug.com/1134111): Use IdentityManager to check sign in status when
// Ephemeral Guest sign in functioncality is implemented.
const bool is_signed_in =
signin_util::GuestSignedInUserData::IsSignedIn(profile_);
return is_signed_in ? CreateNewTabEphemeralGuestSignedInHTML()
: CreateNewTabEphemeralGuestSignedOutHTML();
} }
base::RefCountedMemory* NTPResourceCache::GetNewTabHTML(WindowType win_type) { base::RefCountedMemory* NTPResourceCache::GetNewTabHTML(WindowType win_type) {
......
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