diff --git a/src/vs/workbench/contrib/performance/electron-sandbox/startupTimings.ts b/src/vs/workbench/contrib/performance/electron-sandbox/startupTimings.ts index f094338f9d6d2b2990f87a9881501a51ca072021..f0dcc668f43346b1325c7b0fcfef0cb2ed6d1ac9 100644 --- a/src/vs/workbench/contrib/performance/electron-sandbox/startupTimings.ts +++ b/src/vs/workbench/contrib/performance/electron-sandbox/startupTimings.ts @@ -22,6 +22,7 @@ import { ITimerService } from 'vs/workbench/services/timer/browser/timerService' import { IFileService } from 'vs/platform/files/common/files'; import { URI } from 'vs/base/common/uri'; import { VSBuffer } from 'vs/base/common/buffer'; +import { IWorkspaceTrustManagementService } from 'vs/platform/workspace/common/workspaceTrust'; export class StartupTimings implements IWorkbenchContribution { @@ -36,7 +37,8 @@ export class StartupTimings implements IWorkbenchContribution { @ILifecycleService private readonly _lifecycleService: ILifecycleService, @IUpdateService private readonly _updateService: IUpdateService, @INativeWorkbenchEnvironmentService private readonly _environmentService: INativeWorkbenchEnvironmentService, - @IProductService private readonly _productService: IProductService + @IProductService private readonly _productService: IProductService, + @IWorkspaceTrustManagementService private readonly _workspaceTrustService: IWorkspaceTrustManagementService, ) { // this._report().catch(onUnexpectedError); @@ -78,6 +80,7 @@ export class StartupTimings implements IWorkbenchContribution { private async _isStandardStartup(): Promise { // check for standard startup: // * new window (no reload) + // * workspace is trusted // * just one window // * explorer viewlet visible // * one text editor (not multiple, not webview, welcome etc...) @@ -85,6 +88,9 @@ export class StartupTimings implements IWorkbenchContribution { if (this._lifecycleService.startupKind !== StartupKind.NewWindow) { return StartupKindToString(this._lifecycleService.startupKind); } + if (!this._workspaceTrustService.isWorkpaceTrusted()) { + return 'Workspace not trusted'; + } const windowCount = await this._nativeHostService.getWindowCount(); if (windowCount !== 1) { return 'Expected window count : 1, Actual : ' + windowCount;