src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts/ExtensionsWorkbenchService/install
class ExtensionsWorkbenchService:	install(extension: URI | IExtension, installOptions?: InstallOptions): Promise<IExtension> {
		if (extension instanceof URI) {
			return this.installWithProgress(() => this.installFromVSIX(extension));
		}

		if (extension.isMalicious) {
			return Promise.reject(new Error(nls.localize('malicious', "This extension is reported to be problematic.")));
		}

		const gallery = extension.gallery;

		if (!gallery) {
			return Promise.reject(new Error('Missing gallery'));
		}

		return this.installWithProgress(() => this.installFromGallery(extension, gallery, installOptions), gallery.displayName);
	}