From 70dda694e222a73fd11276908b03509783513e2d Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 7 Aug 2024 14:51:38 +0200 Subject: [PATCH] build: fix build when `enable_pdf_viewer` and `enable_electron_extensions` disabled (#43206) build: fix build when enable_pdf_viewer and enable_electron_extensions disabled --- shell/browser/api/electron_api_session.cc | 1 + shell/browser/electron_browser_context.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index a82329e70eb4..dbd62d1108e3 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -48,6 +48,7 @@ #include "net/base/completion_repeating_callback.h" #include "net/base/load_flags.h" #include "net/base/network_anonymization_key.h" +#include "net/base/registry_controlled_domains/registry_controlled_domain.h" #include "net/http/http_auth_handler_factory.h" #include "net/http/http_auth_preferences.h" #include "net/http/http_cache.h" diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 6d0a6ce686b3..b2396153ce08 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -377,8 +377,10 @@ ElectronBrowserContext::~ElectronBrowserContext() { DCHECK_CURRENTLY_ON(BrowserThread::UI); NotifyWillBeDestroyed(); +#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) // the DestroyBrowserContextServices() call below frees this. extension_system_ = nullptr; +#endif // Notify any keyed services of browser context destruction. BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(