Files
vscode/src/vs/workbench/services/userDataSync/electron-browser/userDataAutoSyncService.ts
Sandeep Somavarapu 5c928dff37 Fix #85618
2020-01-15 11:06:38 +01:00

32 lines
1.2 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IUserDataAutoSyncService } from 'vs/platform/userDataSync/common/userDataSync';
import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
import { Disposable } from 'vs/base/common/lifecycle';
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
export class UserDataAutoSyncService extends Disposable implements IUserDataAutoSyncService {
_serviceBrand: undefined;
private readonly channel: IChannel;
constructor(
@ISharedProcessService sharedProcessService: ISharedProcessService
) {
super();
this.channel = sharedProcessService.getChannel('userDataAutoSync');
}
triggerAutoSync(): Promise<void> {
return this.channel.call('triggerAutoSync');
}
}
registerSingleton(IUserDataAutoSyncService, UserDataAutoSyncService);