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

Update WebUIFactory for ephemeral Guest profiles.

WebUIFactory is updated to deny bookmarks and new-tab-page for ephemeral
Guest profiles.

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

Bug: 1125474
Change-Id: I2ca675330402d656eb2afc5a691e4d59a2385f1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2567395Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832694}
parent f98d25da
...@@ -610,6 +610,11 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, ...@@ -610,6 +610,11 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
url.host_piece() == chrome::kChromeUINewTabPageHost)) { url.host_piece() == chrome::kChromeUINewTabPageHost)) {
return &NewWebUI<PageNotAvailableForGuestUI>; return &NewWebUI<PageNotAvailableForGuestUI>;
} }
if (profile->IsEphemeralGuestProfile() &&
(url.host_piece() == chrome::kChromeUIBookmarksHost ||
url.host_piece() == chrome::kChromeUINewTabPageHost)) {
return &NewWebUI<PageNotAvailableForGuestUI>;
}
// Bookmarks are part of NTP on Android. // Bookmarks are part of NTP on Android.
if (url.host_piece() == chrome::kChromeUIBookmarksHost) if (url.host_piece() == chrome::kChromeUIBookmarksHost)
return &NewWebUI<BookmarksUI>; return &NewWebUI<BookmarksUI>;
......
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