src/vs/platform/extensionManagement/node/extensionManagementService.ts/ExtensionManagementService/createInstallExtensionTask
class ExtensionManagementService:	protected createInstallExtensionTask(manifest: IExtensionManifest, extension: URI | IGalleryExtension, options: InstallExtensionTaskOptions): IInstallExtensionTask {
		let installExtensionTask: IInstallExtensionTask | undefined;
		if (URI.isUri(extension)) {
			installExtensionTask = new InstallVSIXTask(manifest, extension, options, this.galleryService, this.extensionsScanner, this.logService);
		} else {
			const key = ExtensionKey.create(extension).toString();
			installExtensionTask = this.installGalleryExtensionsTasks.get(key);
			if (!installExtensionTask) {
				this.installGalleryExtensionsTasks.set(key, installExtensionTask = new InstallGalleryExtensionTask(manifest, extension, options, this.extensionsDownloader, this.extensionsScanner, this.logService));
				installExtensionTask.waitUntilTaskIsFinished().then(() => this.installGalleryExtensionsTasks.delete(key));
			}
		}
		return new InstallExtensionInProfileTask(installExtensionTask, options.profileLocation, this.extensionsProfileScannerService);
	}