diff --git a/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts b/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts index a8d9a94f50f..c6e03e0bf5f 100644 --- a/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts +++ b/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts @@ -256,7 +256,7 @@ export class ExtensionTipsService extends BaseExtensionTipsService { } private getLastPromptedMediumExeTime(): number { - let value = this.storageService.getNumber(lastPromptedMediumImpExeTimeStorageKey, StorageScope.GLOBAL); + let value = this.storageService.getNumber(lastPromptedMediumImpExeTimeStorageKey, StorageScope.APPLICATION); if (!value) { value = Date.now(); this.updateLastPromptedMediumExeTime(value); @@ -265,17 +265,17 @@ export class ExtensionTipsService extends BaseExtensionTipsService { } private updateLastPromptedMediumExeTime(value: number): void { - this.storageService.store(lastPromptedMediumImpExeTimeStorageKey, value, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(lastPromptedMediumImpExeTimeStorageKey, value, StorageScope.APPLICATION, StorageTarget.MACHINE); } private getPromptedExecutableTips(): IStringDictionary { - return JSON.parse(this.storageService.get(promptedExecutableTipsStorageKey, StorageScope.GLOBAL, '{}')); + return JSON.parse(this.storageService.get(promptedExecutableTipsStorageKey, StorageScope.APPLICATION, '{}')); } private addToRecommendedExecutables(exeName: string, tips: IExecutableBasedExtensionTip[]) { const promptedExecutableTips = this.getPromptedExecutableTips(); promptedExecutableTips[exeName] = tips.map(({ extensionId }) => extensionId.toLowerCase()); - this.storageService.store(promptedExecutableTipsStorageKey, JSON.stringify(promptedExecutableTips), StorageScope.GLOBAL, StorageTarget.USER); + this.storageService.store(promptedExecutableTipsStorageKey, JSON.stringify(promptedExecutableTips), StorageScope.APPLICATION, StorageTarget.USER); } private groupByInstalled(recommendationsToSuggest: string[], local: ILocalExtension[]): { installed: string[]; uninstalled: string[] } { diff --git a/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts b/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts index 19db5e01a89..bf59598603b 100644 --- a/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts +++ b/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts @@ -54,26 +54,26 @@ export class UserDataAutoSyncService extends Disposable implements IUserDataAuto private lastSyncUrl: URI | undefined; private get syncUrl(): URI | undefined { - const value = this.storageService.get(storeUrlKey, StorageScope.GLOBAL); + const value = this.storageService.get(storeUrlKey, StorageScope.APPLICATION); return value ? URI.parse(value) : undefined; } private set syncUrl(syncUrl: URI | undefined) { if (syncUrl) { - this.storageService.store(storeUrlKey, syncUrl.toString(), StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(storeUrlKey, syncUrl.toString(), StorageScope.APPLICATION, StorageTarget.MACHINE); } else { - this.storageService.remove(storeUrlKey, StorageScope.GLOBAL); + this.storageService.remove(storeUrlKey, StorageScope.APPLICATION); } } private previousProductQuality: string | undefined; private get productQuality(): string | undefined { - return this.storageService.get(productQualityKey, StorageScope.GLOBAL); + return this.storageService.get(productQualityKey, StorageScope.APPLICATION); } private set productQuality(productQuality: string | undefined) { if (productQuality) { - this.storageService.store(productQualityKey, productQuality, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(productQualityKey, productQuality, StorageScope.APPLICATION, StorageTarget.MACHINE); } else { - this.storageService.remove(productQualityKey, StorageScope.GLOBAL); + this.storageService.remove(productQualityKey, StorageScope.APPLICATION); } } @@ -194,7 +194,7 @@ export class UserDataAutoSyncService extends Disposable implements IUserDataAuto this.updateEnablement(false); // Reset Session - this.storageService.remove(sessionIdKey, StorageScope.GLOBAL); + this.storageService.remove(sessionIdKey, StorageScope.APPLICATION); // Reset if (everywhere) { @@ -315,7 +315,7 @@ export class UserDataAutoSyncService extends Disposable implements IUserDataAuto } private async disableMachineEventually(): Promise { - this.storageService.store(disableMachineEventuallyKey, true, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(disableMachineEventuallyKey, true, StorageScope.APPLICATION, StorageTarget.MACHINE); await timeout(1000 * 60 * 10); // Return if got stopped meanwhile. @@ -332,11 +332,11 @@ export class UserDataAutoSyncService extends Disposable implements IUserDataAuto } private hasToDisableMachineEventually(): boolean { - return this.storageService.getBoolean(disableMachineEventuallyKey, StorageScope.GLOBAL, false); + return this.storageService.getBoolean(disableMachineEventuallyKey, StorageScope.APPLICATION, false); } private stopDisableMachineEventually(): void { - this.storageService.remove(disableMachineEventuallyKey, StorageScope.GLOBAL); + this.storageService.remove(disableMachineEventuallyKey, StorageScope.APPLICATION); } private sources: string[] = []; @@ -481,7 +481,7 @@ class AutoSync extends Disposable { } } - const sessionId = this.storageService.get(sessionIdKey, StorageScope.GLOBAL); + const sessionId = this.storageService.get(sessionIdKey, StorageScope.APPLICATION); // Server session is different from client session if (sessionId && this.manifest && sessionId !== this.manifest.session) { if (this.hasSyncServiceChanged()) { @@ -521,7 +521,7 @@ class AutoSync extends Disposable { // Update local session id if (this.manifest && this.manifest.session !== sessionId) { - this.storageService.store(sessionIdKey, this.manifest.session, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(sessionIdKey, this.manifest.session, StorageScope.APPLICATION, StorageTarget.MACHINE); } // Return if cancellation is requested diff --git a/src/vs/platform/userDataSync/common/userDataSyncEnablementService.ts b/src/vs/platform/userDataSync/common/userDataSyncEnablementService.ts index ac12a674403..dfb2cccaea1 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncEnablementService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncEnablementService.ts @@ -46,7 +46,7 @@ export class UserDataSyncEnablementService extends Disposable implements IUserDa case 'off': return false; } - return this.storageService.getBoolean(enablementKey, StorageScope.GLOBAL, false); + return this.storageService.getBoolean(enablementKey, StorageScope.APPLICATION, false); } canToggleEnablement(): boolean { @@ -58,11 +58,11 @@ export class UserDataSyncEnablementService extends Disposable implements IUserDa return; } this.telemetryService.publicLog2<{ enabled: boolean }, SyncEnablementClassification>(enablementKey, { enabled }); - this.storageService.store(enablementKey, enabled, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(enablementKey, enabled, StorageScope.APPLICATION, StorageTarget.MACHINE); } isResourceEnabled(resource: SyncResource): boolean { - return this.storageService.getBoolean(getEnablementKey(resource), StorageScope.GLOBAL, true); + return this.storageService.getBoolean(getEnablementKey(resource), StorageScope.APPLICATION, true); } setResourceEnablement(resource: SyncResource, enabled: boolean): void { @@ -77,11 +77,11 @@ export class UserDataSyncEnablementService extends Disposable implements IUserDa } private storeResourceEnablement(resourceEnablementKey: string, enabled: boolean): void { - this.storageService.store(resourceEnablementKey, enabled, StorageScope.GLOBAL, isWeb ? StorageTarget.USER /* sync in web */ : StorageTarget.MACHINE); + this.storageService.store(resourceEnablementKey, enabled, StorageScope.APPLICATION, isWeb ? StorageTarget.USER /* sync in web */ : StorageTarget.MACHINE); } private onDidStorageChange(storageChangeEvent: IStorageValueChangeEvent): void { - if (storageChangeEvent.scope !== StorageScope.GLOBAL) { + if (storageChangeEvent.scope !== StorageScope.APPLICATION) { return; } diff --git a/src/vs/platform/userDataSync/common/userDataSyncMachines.ts b/src/vs/platform/userDataSync/common/userDataSyncMachines.ts index 43b71b2ab05..1158727d42c 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncMachines.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncMachines.ts @@ -132,7 +132,7 @@ export class UserDataSyncMachinesService extends Disposable implements IUserData await this.writeMachinesData(machineData); const currentMachineId = await this.currentMachineIdPromise; if (machineId === currentMachineId) { - this.storageService.store(currentMachineNameKey, name, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(currentMachineNameKey, name, StorageScope.APPLICATION, StorageTarget.MACHINE); } } } @@ -149,7 +149,7 @@ export class UserDataSyncMachinesService extends Disposable implements IUserData } private computeCurrentMachineName(machines: IMachineData[]): string { - const previousName = this.storageService.get(currentMachineNameKey, StorageScope.GLOBAL); + const previousName = this.storageService.get(currentMachineNameKey, StorageScope.APPLICATION); if (previousName) { return previousName; } diff --git a/src/vs/platform/userDataSync/common/userDataSyncService.ts b/src/vs/platform/userDataSync/common/userDataSyncService.ts index 4845ad05da6..d5e5b74cb7f 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncService.ts @@ -85,7 +85,7 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ ) { super(); this.updateStatus([]); - this._lastSyncTime = this.storageService.getNumber(LAST_SYNC_TIME_KEY, StorageScope.GLOBAL, undefined); + this._lastSyncTime = this.storageService.getNumber(LAST_SYNC_TIME_KEY, StorageScope.APPLICATION, undefined); } async createSyncTask(manifest: IUserDataManifest | null, disableCache?: boolean): Promise { @@ -372,7 +372,7 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ async resetLocal(): Promise { this.checkEnablement(); - this.storageService.remove(LAST_SYNC_TIME_KEY, StorageScope.GLOBAL); + this.storageService.remove(LAST_SYNC_TIME_KEY, StorageScope.APPLICATION); if (this.synchronizers.value) { for (const synchroniser of this.synchronizers.value.enabled) { try { @@ -451,7 +451,7 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ private updateLastSyncTime(): void { if (this.status === SyncStatus.Idle) { this._lastSyncTime = new Date().getTime(); - this.storageService.store(LAST_SYNC_TIME_KEY, this._lastSyncTime, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(LAST_SYNC_TIME_KEY, this._lastSyncTime, StorageScope.APPLICATION, StorageTarget.MACHINE); this._onDidChangeLastSyncTime.fire(this._lastSyncTime); } } diff --git a/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts b/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts index 8ae695baae4..5d926223d60 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts @@ -44,10 +44,10 @@ export abstract class AbstractUserDataSyncStoreManagementService extends Disposa get userDataSyncStore(): UserDataSyncStore | undefined { return this._userDataSyncStore; } protected get userDataSyncStoreType(): UserDataSyncStoreType | undefined { - return this.storageService.get(SYNC_SERVICE_URL_TYPE, StorageScope.GLOBAL) as UserDataSyncStoreType; + return this.storageService.get(SYNC_SERVICE_URL_TYPE, StorageScope.APPLICATION) as UserDataSyncStoreType; } protected set userDataSyncStoreType(type: UserDataSyncStoreType | undefined) { - this.storageService.store(SYNC_SERVICE_URL_TYPE, type, StorageScope.GLOBAL, isWeb ? StorageTarget.USER /* sync in web */ : StorageTarget.MACHINE); + this.storageService.store(SYNC_SERVICE_URL_TYPE, type, StorageScope.APPLICATION, isWeb ? StorageTarget.USER /* sync in web */ : StorageTarget.MACHINE); } constructor( @@ -57,7 +57,7 @@ export abstract class AbstractUserDataSyncStoreManagementService extends Disposa ) { super(); this.updateUserDataSyncStore(); - this._register(Event.filter(storageService.onDidChangeValue, e => e.key === SYNC_SERVICE_URL_TYPE && e.scope === StorageScope.GLOBAL && this.userDataSyncStoreType !== this.userDataSyncStore?.type)(() => this.updateUserDataSyncStore())); + this._register(Event.filter(storageService.onDidChangeValue, e => e.key === SYNC_SERVICE_URL_TYPE && e.scope === StorageScope.APPLICATION && this.userDataSyncStoreType !== this.userDataSyncStore?.type)(() => this.updateUserDataSyncStore())); } protected updateUserDataSyncStore(): void { @@ -115,16 +115,16 @@ export class UserDataSyncStoreManagementService extends AbstractUserDataSyncStor ) { super(productService, configurationService, storageService); - const previousConfigurationSyncStore = this.storageService.get(SYNC_PREVIOUS_STORE, StorageScope.GLOBAL); + const previousConfigurationSyncStore = this.storageService.get(SYNC_PREVIOUS_STORE, StorageScope.APPLICATION); if (previousConfigurationSyncStore) { this.previousConfigurationSyncStore = JSON.parse(previousConfigurationSyncStore); } const syncStore = this.productService[CONFIGURATION_SYNC_STORE_KEY]; if (syncStore) { - this.storageService.store(SYNC_PREVIOUS_STORE, JSON.stringify(syncStore), StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(SYNC_PREVIOUS_STORE, JSON.stringify(syncStore), StorageScope.APPLICATION, StorageTarget.MACHINE); } else { - this.storageService.remove(SYNC_PREVIOUS_STORE, StorageScope.GLOBAL); + this.storageService.remove(SYNC_PREVIOUS_STORE, StorageScope.APPLICATION); } } @@ -202,7 +202,7 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync } private initDonotMakeRequestsUntil(): void { - const donotMakeRequestsUntil = this.storageService.getNumber(DONOT_MAKE_REQUESTS_UNTIL_KEY, StorageScope.GLOBAL); + const donotMakeRequestsUntil = this.storageService.getNumber(DONOT_MAKE_REQUESTS_UNTIL_KEY, StorageScope.APPLICATION); if (donotMakeRequestsUntil && Date.now() < donotMakeRequestsUntil) { this.setDonotMakeRequestsUntil(new Date(donotMakeRequestsUntil)); } @@ -219,11 +219,11 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync } if (this._donotMakeRequestsUntil) { - this.storageService.store(DONOT_MAKE_REQUESTS_UNTIL_KEY, this._donotMakeRequestsUntil.getTime(), StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(DONOT_MAKE_REQUESTS_UNTIL_KEY, this._donotMakeRequestsUntil.getTime(), StorageScope.APPLICATION, StorageTarget.MACHINE); this.resetDonotMakeRequestsUntilPromise = createCancelablePromise(token => timeout(this._donotMakeRequestsUntil!.getTime() - Date.now(), token).then(() => this.setDonotMakeRequestsUntil(undefined))); this.resetDonotMakeRequestsUntilPromise.then(null, e => null /* ignore error */); } else { - this.storageService.remove(DONOT_MAKE_REQUESTS_UNTIL_KEY, StorageScope.GLOBAL); + this.storageService.remove(DONOT_MAKE_REQUESTS_UNTIL_KEY, StorageScope.APPLICATION); } this._onDidChangeDonotMakeRequestsUntil.fire(); @@ -362,7 +362,7 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync } } - const currentSessionId = this.storageService.get(USER_SESSION_ID_KEY, StorageScope.GLOBAL); + const currentSessionId = this.storageService.get(USER_SESSION_ID_KEY, StorageScope.APPLICATION); if (currentSessionId && manifest && currentSessionId !== manifest.session) { // Server session is different from client session so clear cached session. @@ -376,7 +376,7 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync if (manifest) { // update session - this.storageService.store(USER_SESSION_ID_KEY, manifest.session, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(USER_SESSION_ID_KEY, manifest.session, StorageScope.APPLICATION, StorageTarget.MACHINE); } return manifest; @@ -397,8 +397,8 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync } private clearSession(): void { - this.storageService.remove(USER_SESSION_ID_KEY, StorageScope.GLOBAL); - this.storageService.remove(MACHINE_SESSION_ID_KEY, StorageScope.GLOBAL); + this.storageService.remove(USER_SESSION_ID_KEY, StorageScope.APPLICATION); + this.storageService.remove(MACHINE_SESSION_ID_KEY, StorageScope.APPLICATION); } private async request(url: string, options: IRequestOptions, successCodes: number[], token: CancellationToken): Promise { @@ -518,14 +518,14 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync } private addSessionHeaders(headers: IHeaders): void { - let machineSessionId = this.storageService.get(MACHINE_SESSION_ID_KEY, StorageScope.GLOBAL); + let machineSessionId = this.storageService.get(MACHINE_SESSION_ID_KEY, StorageScope.APPLICATION); if (machineSessionId === undefined) { machineSessionId = generateUuid(); - this.storageService.store(MACHINE_SESSION_ID_KEY, machineSessionId, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(MACHINE_SESSION_ID_KEY, machineSessionId, StorageScope.APPLICATION, StorageTarget.MACHINE); } headers['X-Machine-Session-Id'] = machineSessionId; - const userSessionId = this.storageService.get(USER_SESSION_ID_KEY, StorageScope.GLOBAL); + const userSessionId = this.storageService.get(USER_SESSION_ID_KEY, StorageScope.APPLICATION); if (userSessionId !== undefined) { headers['X-User-Session-Id'] = userSessionId; } diff --git a/src/vs/workbench/contrib/extensions/electron-sandbox/remoteExtensionsInit.ts b/src/vs/workbench/contrib/extensions/electron-sandbox/remoteExtensionsInit.ts index aa4a1d19536..7209af8ccaf 100644 --- a/src/vs/workbench/contrib/extensions/electron-sandbox/remoteExtensionsInit.ts +++ b/src/vs/workbench/contrib/extensions/electron-sandbox/remoteExtensionsInit.ts @@ -57,11 +57,11 @@ export class RemoteExtensionsInitializerContribution implements IWorkbenchContri } const newRemoteConnectionKey = `${IS_NEW_KEY}.${connection.remoteAuthority}`; // Skip: Not a new remote connection - if (!this.storageService.getBoolean(newRemoteConnectionKey, StorageScope.GLOBAL, true)) { + if (!this.storageService.getBoolean(newRemoteConnectionKey, StorageScope.APPLICATION, true)) { this.logService.trace(`Skipping initializing remote extensions because the window with this remote authority was opened before.`); return; } - this.storageService.store(newRemoteConnectionKey, false, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(newRemoteConnectionKey, false, StorageScope.APPLICATION, StorageTarget.MACHINE); // Skip: Not a new workspace if (!this.storageService.isNew(StorageScope.WORKSPACE)) { this.logService.trace(`Skipping initializing remote extensions because this workspace was opened before.`); diff --git a/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts b/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts index e19fdd2509b..7209305803b 100644 --- a/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts +++ b/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts @@ -218,7 +218,7 @@ export class WebExtensionsScannerService extends Disposable implements IWebExten } const result: IScannedExtension[] = []; try { - const useCache = this.storageService.get('additionalBuiltinExtensions', StorageScope.GLOBAL, '[]') === JSON.stringify(extensions); + const useCache = this.storageService.get('additionalBuiltinExtensions', StorageScope.APPLICATION, '[]') === JSON.stringify(extensions); const webExtensions = await (useCache ? this.getCustomBuiltinExtensionsFromCache() : this.updateCustomBuiltinExtensionsCache()); if (webExtensions.length) { await Promise.all(webExtensions.map(async webExtension => { @@ -232,7 +232,7 @@ export class WebExtensionsScannerService extends Disposable implements IWebExten } })); } - this.storageService.store('additionalBuiltinExtensions', JSON.stringify(extensions), StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store('additionalBuiltinExtensions', JSON.stringify(extensions), StorageScope.APPLICATION, StorageTarget.MACHINE); } catch (error) { this.logService.info('Ignoring following additional builtin extensions as there is an error while fetching them from gallery', extensions.map(({ id }) => id), getErrorMessage(error)); } diff --git a/src/vs/workbench/services/userData/browser/userDataInit.ts b/src/vs/workbench/services/userData/browser/userDataInit.ts index 404c963b5ff..1d7504a2656 100644 --- a/src/vs/workbench/services/userData/browser/userDataInit.ts +++ b/src/vs/workbench/services/userData/browser/userDataInit.ts @@ -87,7 +87,7 @@ export class UserDataInitializationService implements IUserDataInitializationSer return; } - if (!this.storageService.isNew(StorageScope.GLOBAL)) { + if (!this.storageService.isNew(StorageScope.APPLICATION)) { this.logService.trace(`Skipping initializing user data as application was opened before`); return; } diff --git a/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts b/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts index f0b94a22f71..78c27df5d0c 100644 --- a/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts +++ b/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts @@ -631,7 +631,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat } private onDidChangeStorage(e: IStorageValueChangeEvent): void { - if (e.key === UserDataSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY && e.scope === StorageScope.GLOBAL + if (e.key === UserDataSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY && e.scope === StorageScope.APPLICATION && this.currentSessionId !== this.getStoredCachedSessionId() /* This checks if current window changed the value or not */) { this._cachedCurrentSessionId = null; this.update(); @@ -651,24 +651,24 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat this._cachedCurrentSessionId = cachedSessionId; if (cachedSessionId === undefined) { this.logService.info('Settings Sync: Reset current session'); - this.storageService.remove(UserDataSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, StorageScope.GLOBAL); + this.storageService.remove(UserDataSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, StorageScope.APPLICATION); } else { this.logService.info('Settings Sync: Updated current session', cachedSessionId); - this.storageService.store(UserDataSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, cachedSessionId, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(UserDataSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, cachedSessionId, StorageScope.APPLICATION, StorageTarget.MACHINE); } } } private getStoredCachedSessionId(): string | undefined { - return this.storageService.get(UserDataSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, StorageScope.GLOBAL); + return this.storageService.get(UserDataSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, StorageScope.APPLICATION); } private get useWorkbenchSessionId(): boolean { - return !this.storageService.getBoolean(UserDataSyncWorkbenchService.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY, StorageScope.GLOBAL, false); + return !this.storageService.getBoolean(UserDataSyncWorkbenchService.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY, StorageScope.APPLICATION, false); } private set useWorkbenchSessionId(useWorkbenchSession: boolean) { - this.storageService.store(UserDataSyncWorkbenchService.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY, !useWorkbenchSession, StorageScope.GLOBAL, StorageTarget.MACHINE); + this.storageService.store(UserDataSyncWorkbenchService.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY, !useWorkbenchSession, StorageScope.APPLICATION, StorageTarget.MACHINE); } }