mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: compilation error when disabling extensions and pdf_viewer (#47964)
This commit is contained in:
@@ -33,6 +33,7 @@ std::string PluginUtils::GetExtensionIdForMimeType(
|
||||
base::flat_map<std::string, std::string>
|
||||
PluginUtils::GetMimeTypeToExtensionIdMap(
|
||||
content::BrowserContext* browser_context) {
|
||||
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
const auto& allowed_extension_ids = MimeTypesHandler::GetMIMETypeAllowlist();
|
||||
if (allowed_extension_ids.empty())
|
||||
@@ -41,8 +42,6 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
|
||||
const extensions::ExtensionSet& enabled_extensions =
|
||||
extensions::ExtensionRegistry::Get(browser_context)->enabled_extensions();
|
||||
|
||||
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
|
||||
|
||||
// Go through the white-listed extensions and try to use them to intercept
|
||||
// the URL request.
|
||||
for (const std::string& id : allowed_extension_ids) {
|
||||
|
||||
Reference in New Issue
Block a user