src/vs/platform/extensionManagement/common/extensionsScannerService.ts/AbstractExtensionsScannerService/initializeDefaultProfileExtensions
class AbstractExtensionsScannerService:	initializeDefaultProfileExtensions(): Promise<void> {
		if (!this._initializeDefaultProfileExtensionsPromise) {
			this._initializeDefaultProfileExtensionsPromise = (async () => {
				try {
					const initMarker = this.uriIdentityService.extUri.joinPath(this.userExtensionsLocation, '.init-default-profile-extensions');
					if (await this.fileService.exists(initMarker)) {
						return;
					}
					if (
						// current default profile extensions location
						!(await this.fileService.exists(this.userDataProfilesService.defaultProfile.extensionsResource))
						// old default profile extensions location
						&& !(await this.fileService.exists(this.uriIdentityService.extUri.joinPath(this.userDataProfilesService.defaultProfile.location, 'extensions.json')))
					) {
						this.logService.info('Started initializing default profile extensions in extensions installation folder.', this.userExtensionsLocation.toString());
						const userExtensions = await this.scanUserExtensions({ includeInvalid: true });
						await this.extensionsProfileScannerService.addExtensionsToProfile(userExtensions.map(e => [e, e.metadata]), this.userDataProfilesService.defaultProfile.extensionsResource);
						this.logService.info('Completed initializing default profile extensions in extensions installation folder.', this.userExtensionsLocation.toString());
					}
					try {
						await this.fileService.createFile(initMarker, VSBuffer.fromString(''));
					} catch (error) {
						if (toFileOperationResult(error) !== FileOperationResult.FILE_NOT_FOUND) {
							this.logService.warn('Failed to create default profile extensions initialize marker in extensions installation folder.', this.userExtensionsLocation.toString(), getErrorMessage(error));
						}
					}
				} catch (error) {
					this.logService.error(error);
					throw error;
				}
			})();
		}
		return this._initializeDefaultProfileExtensionsPromise;
	}