Skip to content

Commit

Permalink
Fixes call to ShouldBlockPlaylistWebUI().
Browse files Browse the repository at this point in the history
  • Loading branch information
szilardszaloki committed Nov 6, 2024
1 parent 0ab239d commit 0ae54ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions browser/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,10 @@ source_set("ui") {
]
}

if (enable_playlist) {
deps += [ "//brave/components/playlist/common" ]
}

if (enable_playlist_webui) {
sources += [
"playlist/playlist_browser_finder.cc",
Expand Down
7 changes: 5 additions & 2 deletions browser/ui/webui/brave_web_ui_controller_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

#if BUILDFLAG(ENABLE_PLAYLIST_WEBUI)
#include "brave/browser/ui/webui/playlist_ui.h"
#include "brave/components/playlist/common/features.h"
#endif

#if BUILDFLAG(ENABLE_TOR)
Expand Down Expand Up @@ -244,8 +245,10 @@ WebUI::TypeID BraveWebUIControllerFactory::GetWebUIType(
}
#endif // BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(ENABLE_PLAYLIST_WEBUI)
if (playlist::PlaylistUI::ShouldBlockPlaylistWebUI(browser_context, url)) {
return WebUI::kNoWebUI;
if (base::FeatureList::IsEnabled(playlist::features::kPlaylist)) {
if (playlist::PlaylistUI::ShouldBlockPlaylistWebUI(browser_context, url)) {
return WebUI::kNoWebUI;
}
}
#endif

Expand Down

0 comments on commit 0ae54ec

Please sign in to comment.