fix: pdf viewer permissions (#29210)

* fix: pdf viewer permissions

* fixup for getAllExtensions
This commit is contained in:
John Kleinschmidt 2021-05-19 19:08:24 -04:00 committed by GitHub
parent cd3c6f9e37
commit d79ebc6dc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -851,7 +851,7 @@ v8::Local<v8::Value> Session::GetAllExtensions() {
std::vector<const extensions::Extension*> extensions_vector; std::vector<const extensions::Extension*> extensions_vector;
for (const auto& extension : *installed_extensions) { for (const auto& extension : *installed_extensions) {
if (extension->location() != if (extension->location() !=
extensions::mojom::ManifestLocation::kExternalComponent) extensions::mojom::ManifestLocation::kComponent)
extensions_vector.emplace_back(extension.get()); extensions_vector.emplace_back(extension.get());
} }
return gin::ConvertToV8(isolate_, extensions_vector); return gin::ConvertToV8(isolate_, extensions_vector);

View file

@ -119,8 +119,7 @@ void ElectronExtensionSystem::LoadComponentExtensions() {
root_directory = root_directory.Append(FILE_PATH_LITERAL("pdf")); root_directory = root_directory.Append(FILE_PATH_LITERAL("pdf"));
scoped_refptr<const Extension> pdf_extension = scoped_refptr<const Extension> pdf_extension =
extensions::Extension::Create( extensions::Extension::Create(
root_directory, root_directory, extensions::mojom::ManifestLocation::kComponent,
extensions::mojom::ManifestLocation::kExternalComponent,
*pdf_manifest, extensions::Extension::REQUIRE_KEY, &utf8_error); *pdf_manifest, extensions::Extension::REQUIRE_KEY, &utf8_error);
extension_loader_->registrar()->AddExtension(pdf_extension); extension_loader_->registrar()->AddExtension(pdf_extension);
} }