156
157
constructor(
159
>
readonly collection: string | undefined,
160
>
@IFileService protected readonly fileService: IFileService,
161
>
@IEnvironmentService protected readonly environmentService: IEnvironmentService,
162
>
@IStorageService protected readonly storageService: IStorageService,
163
>
@IUserDataSyncStoreService protected readonly userDataSyncStoreService: IUserDataSyncStoreService,
164
>
@IUserDataSyncLocalStoreService protected readonly userDataSyncLocalStoreService: IUserDataSyncLocalStoreService,
165
>
@IUserDataSyncEnablementService protected readonly userDataSyncEnablementService: IUserDataSyncEnablementService,
166
>
@ITelemetryService protected readonly telemetryService: ITelemetryService,
167
>
@IUserDataSyncLogService protected readonly logService: IUserDataSyncLogService,
168
>
@IConfigurationService protected readonly configurationService: IConfigurationService,
169
>
@IUriIdentityService uriIdentityService: IUriIdentityService,
170
>
) {
171
>
super();
172
>
this.lastSyncUserDataStateKey = `${collection ? `${collection}.` : ''}${syncResource.syncResource}.lastSyncUserData`;
173
>
this.resource = syncResource.syncResource;
174
>
this.syncResourceLogLabel = getSyncResourceLogLabel(syncResource.syncResource, syncResource.profile);
175
>
this.extUri = uriIdentityService.extUri;
176
>
this.syncFolder = this.extUri.joinPath(environmentService.userDataSyncHome, ...getPathSegments(syncResource.profile.isDefault ? undefined : syncResource.profile.id, syncResource.syncResource));
177
>
this.syncPreviewFolder = this.extUri.joinPath(this.syncFolder, PREVIEW_DIR_NAME);
178
>
this.lastSyncResource = getLastSyncResourceUri(syncResource.profile.isDefault ? undefined : syncResource.profile.id, syncResource.syncResource, environmentService, this.extUri);
179
>
this.currentMachineIdPromise = getServiceMachineId(environmentService, fileService, storageService);
180
>
}
181
182
protected triggerLocalChange(): void {