diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 163a5c45e7e2..9a8445b4f7c0 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -47,6 +47,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 779a76573d17..143b1c40b843 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -373,8 +373,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(