diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index f696edb2962..c2bee33c948 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -263,9 +263,7 @@ bool AllowFileAccess(const std::string& extension_id, extension_id); } -RenderProcessHostPrivilege GetPrivilegeRequiredByUrl( - const GURL& url, - extensions::ExtensionRegistry* registry) { +RenderProcessHostPrivilege GetPrivilegeRequiredByUrl(const GURL& url) { // Default to a normal renderer cause it is lower privileged. This should only // occur if the URL on a site instance is either malformed, or uninitialized. // If it is malformed, then there is no need for better privileges anyways. @@ -733,15 +731,12 @@ bool ElectronBrowserClient::IsSuitableHost( const GURL& site_url) { #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) auto* browser_context = process_host->GetBrowserContext(); - extensions::ExtensionRegistry* registry = - extensions::ExtensionRegistry::Get(browser_context); extensions::ProcessMap* process_map = extensions::ProcessMap::Get(browser_context); // Otherwise, just make sure the process privilege matches the privilege // required by the site. - RenderProcessHostPrivilege privilege_required = - GetPrivilegeRequiredByUrl(site_url, registry); + const auto privilege_required = GetPrivilegeRequiredByUrl(site_url); return GetProcessPrivilege(process_host, process_map) == privilege_required; #else return content::ContentBrowserClient::IsSuitableHost(process_host, site_url);