src/vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner.ts/CachedExtensionScanner/_scanInstalledExtensions
class CachedExtensionScanner:	private async _scanInstalledExtensions(): Promise<IExtensionDescription[]> {
		try {
			const language = platform.language;
			const defaultProfileExtensionsInitKey = `${this._userDataProfileService.currentProfile.extensionsResource.toString()}.init`;
			if (this._userDataProfileService.currentProfile.isDefault && !this._storageService.getBoolean(defaultProfileExtensionsInitKey, StorageScope.APPLICATION, false)) {
				await this._extensionsScannerService.initializeDefaultProfileExtensions();
				this._storageService.store(defaultProfileExtensionsInitKey, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
			}
			const [scannedSystemExtensions, scannedUserExtensions] = await Promise.all([
				this._extensionsScannerService.scanSystemExtensions({ language, useCache: true, checkControlFile: true }),
				this._extensionsScannerService.scanUserExtensions({ language, profileLocation: this._userDataProfileService.currentProfile.extensionsResource, useCache: true })]);
			const scannedDevelopedExtensions = await this._extensionsScannerService.scanExtensionsUnderDevelopment({ language }, [...scannedSystemExtensions, ...scannedUserExtensions]);
			const system = scannedSystemExtensions.map(e => toExtensionDescription(e, false));
			const user = scannedUserExtensions.map(e => toExtensionDescription(e, false));
			const development = scannedDevelopedExtensions.map(e => toExtensionDescription(e, true));
			const r = dedupExtensions(system, user, development, this._logService);
			const disposable = this._extensionsScannerService.onDidChangeCache(() => {
				disposable.dispose();
				this._notificationService.prompt(
					Severity.Error,
					localize('extensionCache.invalid', "Extensions have been modified on disk. Please reload the window."),
					[{
						label: localize('reloadWindow', "Reload Window"),
						run: () => this._hostService.reload()
					}]
				);
			});
			timeout(5000).then(() => disposable.dispose());
			return r;
		} catch (err) {
			this._logService.error(`Error scanning installed extensions:`);
			this._logService.error(err);
			return [];
		}
	}