提交 a6725242 编写于 作者: D Daniel Imms

Add hotExit:triggered event

Fixes #16942
上级 d1e2255a
......@@ -17,6 +17,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IWindowsService } from 'vs/platform/windows/common/windows';
import { ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
export class BackupModelService implements IBackupModelService {
......@@ -34,7 +35,8 @@ export class BackupModelService implements IBackupModelService {
@IConfigurationService private configurationService: IConfigurationService,
@IUntitledEditorService private untitledEditorService: IUntitledEditorService,
@IEnvironmentService private environmentService: IEnvironmentService,
@IWindowsService private windowsService: IWindowsService
@IWindowsService private windowsService: IWindowsService,
@ITelemetryService private telemetryService: ITelemetryService
) {
this.toDispose = [];
......@@ -125,6 +127,8 @@ export class BackupModelService implements IBackupModelService {
return TPromise.as({ didBackup: false });
}
this.telemetryService.publicLog('hotExit:triggered', { reason, windowCount, fileCount: dirtyToBackup.length });
// Backup
return this.backupAll(dirtyToBackup, textFileEditorModelManager).then(() => { return { didBackup: true }; }); // we did backup
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册