Merge from vscode de81ccf04849309f843db21130c806a5783678f7 (#4738)

This commit is contained in:
Anthony Dresser
2019-03-28 13:06:16 -07:00
committed by GitHub
parent cc2951265e
commit e6785ffe95
77 changed files with 562 additions and 835 deletions

View File

@@ -9,8 +9,10 @@ import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProces
import { URLServiceChannelClient, URLHandlerChannel } from 'vs/platform/url/node/urlIpc';
import { URLService } from 'vs/platform/url/common/urlService';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import product from 'vs/platform/product/node/product';
export class RelayURLService extends URLService implements IURLHandler {
private urlService: IURLService;
constructor(
@@ -25,8 +27,12 @@ export class RelayURLService extends URLService implements IURLHandler {
openerService.registerOpener(this);
}
open(uri: URI): Promise<boolean> {
return this.urlService.open(uri);
async open(uri: URI): Promise<boolean> {
if (uri.scheme !== product.urlProtocol) {
return false;
}
return await this.urlService.open(uri);
}
handleURL(uri: URI): Promise<boolean> {