src/vs/workbench/services/extensionManagement/common/webExtensionManagementService.ts/WebExtensionManagementService/whenProfileChanged
class WebExtensionManagementService:	private async whenProfileChanged(e: DidChangeUserDataProfileEvent): Promise<void> {
		const previousProfileLocation = e.previous.extensionsResource;
		const currentProfileLocation = e.profile.extensionsResource;
		if (!previousProfileLocation || !currentProfileLocation) {
			throw new Error('This should not happen');
		}
		if (e.preserveData) {
			await this.webExtensionsScannerService.copyExtensions(previousProfileLocation, currentProfileLocation, e => !e.metadata?.isApplicationScoped);
		} else {
			const oldExtensions = await this.webExtensionsScannerService.scanUserExtensions(previousProfileLocation);
			const newExtensions = await this.webExtensionsScannerService.scanUserExtensions(currentProfileLocation);
			const { added, removed } = delta(oldExtensions, newExtensions, (a, b) => compare(`${ExtensionIdentifier.toKey(a.identifier.id)}@${a.manifest.version}`, `${ExtensionIdentifier.toKey(b.identifier.id)}@${b.manifest.version}`));
			if (added.length || removed.length) {
				this._onDidChangeProfile.fire({ added: added.map(e => toLocalExtension(e)), removed: removed.map(e => toLocalExtension(e)) });
			}
		}
	}