NavigationThrottleRunner2: Remove MaybeAddThrottle

https://chromium-review.googlesource.com/c/chromium/src/+/6628079
This commit is contained in:
John Kleinschmidt
2025-06-12 12:50:22 -04:00
parent 73693f68c9
commit 16f2824ba6

View File

@@ -954,18 +954,16 @@ bool ElectronBrowserClient::HandleExternalProtocol(
void ElectronBrowserClient::CreateThrottlesForNavigation(
content::NavigationThrottleRegistry& registry) {
registry.MaybeAddThrottle(
std::make_unique<ElectronNavigationThrottle>(registry));
registry.AddThrottle(std::make_unique<ElectronNavigationThrottle>(registry));
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
registry.MaybeAddThrottle(
registry.AddThrottle(
std::make_unique<extensions::ExtensionNavigationThrottle>(registry));
#endif
#if BUILDFLAG(ENABLE_PDF_VIEWER)
registry.MaybeAddThrottle(
std::make_unique<PDFIFrameNavigationThrottle>(registry));
registry.MaybeAddThrottle(std::make_unique<pdf::PdfNavigationThrottle>(
registry.AddThrottle(std::make_unique<PDFIFrameNavigationThrottle>(registry));
registry.AddThrottle(std::make_unique<pdf::PdfNavigationThrottle>(
registry, std::make_unique<ChromePdfStreamDelegate>()));
#endif
}