src/vs/workbench/services/workspaces/common/workspaceTrust.ts/WorkspaceTrustManagementService/doGetUriTrustInfo
class WorkspaceTrustManagementService:	private doGetUriTrustInfo(uri: URI): IWorkspaceTrustUriInfo {
		// Return trusted when workspace trust is disabled
		if (!this.workspaceTrustEnabled) {
			return { trusted: true, uri };
		}

		if (this.isTrustedVirtualResource(uri)) {
			return { trusted: true, uri };
		}

		if (this.isTrustedByRemote(uri)) {
			return { trusted: true, uri };
		}

		let resultState = false;
		let maxLength = -1;

		let resultUri = uri;

		for (const trustInfo of this._trustStateInfo.uriTrustInfo) {
			if (this.uriIdentityService.extUri.isEqualOrParent(uri, trustInfo.uri)) {
				const fsPath = trustInfo.uri.fsPath;
				if (fsPath.length > maxLength) {
					maxLength = fsPath.length;
					resultState = trustInfo.trusted;
					resultUri = trustInfo.uri;
				}
			}
		}

		return { trusted: resultState, uri: resultUri };
	}