@@ -28,7 +28,7 @@ import { merge } from 'vs/platform/userDataSync/common/globalStateMerge';
28
28
import { ALL_SYNC_RESOURCES , Change , createSyncHeaders , getEnablementKey , IGlobalState , IRemoteUserData , IStorageValue , ISyncData , IUserData , IUserDataSyncBackupStoreService , IUserDataSynchroniser , IUserDataSyncLogService , IUserDataSyncEnablementService , IUserDataSyncStoreService , SyncResource , SYNC_SERVICE_URL_TYPE , UserDataSyncError , UserDataSyncErrorCode , UserDataSyncStoreType , USER_DATA_SYNC_SCHEME } from 'vs/platform/userDataSync/common/userDataSync' ;
29
29
import { UserDataSyncStoreClient } from 'vs/platform/userDataSync/common/userDataSyncStoreService' ;
30
30
import { IUserDataProfile , IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile' ;
31
- import { IUserDataSyncProfilesStorageService } from 'vs/platform/userDataSync /common/userDataSyncProfilesStorageService ' ;
31
+ import { IUserDataProfileStorageService } from 'vs/platform/userDataProfile /common/userDataProfileStorageService ' ;
32
32
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
33
33
34
34
const argvStoragePrefx = 'globalState.argv.' ;
@@ -80,7 +80,7 @@ export class GlobalStateSynchroniser extends AbstractSynchroniser implements IUs
80
80
constructor (
81
81
profile : IUserDataProfile ,
82
82
collection : string | undefined ,
83
- @IUserDataSyncProfilesStorageService private readonly userDataSyncProfilesStorageService : IUserDataSyncProfilesStorageService ,
83
+ @IUserDataProfileStorageService private readonly userDataProfileStorageService : IUserDataProfileStorageService ,
84
84
@IFileService fileService : IFileService ,
85
85
@IUserDataSyncStoreService userDataSyncStoreService : IUserDataSyncStoreService ,
86
86
@IUserDataSyncBackupStoreService userDataSyncBackupStoreService : IUserDataSyncBackupStoreService ,
@@ -100,7 +100,7 @@ export class GlobalStateSynchroniser extends AbstractSynchroniser implements IUs
100
100
Event . any (
101
101
/* Locale change */
102
102
Event . filter ( fileService . onDidFilesChange , e => e . contains ( this . environmentService . argvResource ) ) ,
103
- Event . filter ( userDataSyncProfilesStorageService . onDidChange , e => {
103
+ Event . filter ( userDataProfileStorageService . onDidChange , e => {
104
104
/* StorageTarget has changed in profile storage */
105
105
if ( e . targetChanges . some ( profile => this . syncResource . profile . id === profile . id ) ) {
106
106
return true ;
@@ -282,7 +282,7 @@ export class GlobalStateSynchroniser extends AbstractSynchroniser implements IUs
282
282
}
283
283
284
284
private async getStorageKeys ( lastSyncGlobalState : IGlobalState | null ) : Promise < StorageKeys > {
285
- const storageData = await this . userDataSyncProfilesStorageService . readStorageData ( this . syncResource . profile ) ;
285
+ const storageData = await this . userDataProfileStorageService . readStorageData ( this . syncResource . profile ) ;
286
286
const user : string [ ] = [ ] , machine : string [ ] = [ ] ;
287
287
for ( const [ key , value ] of storageData ) {
288
288
if ( value . target === StorageTarget . USER ) {
@@ -309,7 +309,7 @@ export class LocalGlobalStateProvider {
309
309
constructor (
310
310
@IFileService private readonly fileService : IFileService ,
311
311
@IEnvironmentService private readonly environmentService : IEnvironmentService ,
312
- @IUserDataSyncProfilesStorageService private readonly userDataSyncProfilesStorageService : IUserDataSyncProfilesStorageService ,
312
+ @IUserDataProfileStorageService private readonly userDataProfileStorageService : IUserDataProfileStorageService ,
313
313
@IUserDataSyncLogService private readonly logService : IUserDataSyncLogService
314
314
) { }
315
315
@@ -324,7 +324,7 @@ export class LocalGlobalStateProvider {
324
324
}
325
325
}
326
326
}
327
- const storageData = await this . userDataSyncProfilesStorageService . readStorageData ( profile ) ;
327
+ const storageData = await this . userDataProfileStorageService . readStorageData ( profile ) ;
328
328
for ( const [ key , value ] of storageData ) {
329
329
if ( value . value && value . target === StorageTarget . USER ) {
330
330
storage [ key ] = { version : 1 , value : value . value } ;
@@ -349,7 +349,7 @@ export class LocalGlobalStateProvider {
349
349
const syncResourceLogLabel = getSyncResourceLogLabel ( SyncResource . GlobalState , profile ) ;
350
350
const argv : IStringDictionary < any > = { } ;
351
351
const updatedStorage = new Map < string , string | undefined > ( ) ;
352
- const storageData = await this . userDataSyncProfilesStorageService . readStorageData ( profile ) ;
352
+ const storageData = await this . userDataProfileStorageService . readStorageData ( profile ) ;
353
353
const handleUpdatedStorage = ( keys : string [ ] , storage ?: IStringDictionary < IStorageValue > ) : void => {
354
354
for ( const key of keys ) {
355
355
if ( key . startsWith ( argvStoragePrefx ) ) {
@@ -389,7 +389,7 @@ export class LocalGlobalStateProvider {
389
389
390
390
if ( updatedStorage . size ) {
391
391
this . logService . trace ( `${ syncResourceLogLabel } : Updating global state...` ) ;
392
- await this . userDataSyncProfilesStorageService . updateStorageData ( profile , updatedStorage , StorageTarget . USER ) ;
392
+ await this . userDataProfileStorageService . updateStorageData ( profile , updatedStorage , StorageTarget . USER ) ;
393
393
this . logService . info ( `${ syncResourceLogLabel } : Updated global state` , [ ...updatedStorage . keys ( ) ] ) ;
394
394
}
395
395
}
0 commit comments