mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
NavigationThrottleRunner2: Remove MaybeAddThrottle
https://chromium-review.googlesource.com/c/chromium/src/+/6628079
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user