src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts/Extensions/syncLocalWithGalleryExtension
class Extensions:	async syncLocalWithGalleryExtension(gallery: IGalleryExtension, maliciousExtensionSet: Set<string>): Promise<boolean> {
		const extension = this.getInstalledExtensionMatchingGallery(gallery);
		if (!extension) {
			return false;
		}
		if (maliciousExtensionSet.has(extension.identifier.id)) {
			extension.isMalicious = true;
		}
		// Loading the compatible version only there is an engine property
		// Otherwise falling back to old way so that we will not make many roundtrips
		const compatible = gallery.properties.engine ? await this.galleryService.getCompatibleExtension(gallery) : gallery;
		if (!compatible) {
			return false;
		}
		// Sync the local extension with gallery extension if local extension doesnot has metadata
		if (extension.local) {
			const local = extension.local.identifier.uuid ? extension.local : await this.server.extensionManagementService.updateMetadata(extension.local, { id: compatible.identifier.uuid, publisherDisplayName: compatible.publisherDisplayName, publisherId: compatible.publisherId });
			extension.local = local;
			extension.gallery = compatible;
			this._onChange.fire({ extension });
			return true;
		}
		return false;
	}