chore: remove unused registry arg from GetPrivilegeRequiredByUrl() (#44933)

this has never been used; introduced by 91071570

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-12-02 17:16:15 -05:00 committed by GitHub
parent 058315dc30
commit e13fc9809b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -263,9 +263,7 @@ bool AllowFileAccess(const std::string& extension_id,
extension_id); extension_id);
} }
RenderProcessHostPrivilege GetPrivilegeRequiredByUrl( RenderProcessHostPrivilege GetPrivilegeRequiredByUrl(const GURL& url) {
const GURL& url,
extensions::ExtensionRegistry* registry) {
// Default to a normal renderer cause it is lower privileged. This should only // 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. // 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. // If it is malformed, then there is no need for better privileges anyways.
@ -733,15 +731,12 @@ bool ElectronBrowserClient::IsSuitableHost(
const GURL& site_url) { const GURL& site_url) {
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
auto* browser_context = process_host->GetBrowserContext(); auto* browser_context = process_host->GetBrowserContext();
extensions::ExtensionRegistry* registry =
extensions::ExtensionRegistry::Get(browser_context);
extensions::ProcessMap* process_map = extensions::ProcessMap* process_map =
extensions::ProcessMap::Get(browser_context); extensions::ProcessMap::Get(browser_context);
// Otherwise, just make sure the process privilege matches the privilege // Otherwise, just make sure the process privilege matches the privilege
// required by the site. // required by the site.
RenderProcessHostPrivilege privilege_required = const auto privilege_required = GetPrivilegeRequiredByUrl(site_url);
GetPrivilegeRequiredByUrl(site_url, registry);
return GetProcessPrivilege(process_host, process_map) == privilege_required; return GetProcessPrivilege(process_host, process_map) == privilege_required;
#else #else
return content::ContentBrowserClient::IsSuitableHost(process_host, site_url); return content::ContentBrowserClient::IsSuitableHost(process_host, site_url);