mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 2b0b9136329c181a9e381463a1f7dc3a2d105a34 (#4880)
This commit is contained in:
@@ -20,6 +20,10 @@ export class RemoteAuthorityResolverService implements IRemoteAuthorityResolverS
|
||||
return Promise.resolve({ authority, host: authority, port: 80 });
|
||||
}
|
||||
|
||||
clearResolvedAuthority(authority: string): void {
|
||||
throw new Error(`Not implemented`);
|
||||
}
|
||||
|
||||
setResolvedAuthority(resolvedAuthority: ResolvedAuthority) {
|
||||
throw new Error(`Not implemented`);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ export interface IRemoteAuthorityResolverService {
|
||||
|
||||
resolveAuthority(authority: string): Promise<ResolvedAuthority>;
|
||||
|
||||
clearResolvedAuthority(authority: string): void;
|
||||
setResolvedAuthority(resolvedAuthority: ResolvedAuthority): void;
|
||||
setResolvedAuthorityError(authority: string, err: any): void;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
import { ResolvedAuthority, IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver';
|
||||
import { ipcRenderer as ipc } from 'electron';
|
||||
import * as errors from 'vs/base/common/errors';
|
||||
|
||||
class PendingResolveAuthorityRequest {
|
||||
constructor(
|
||||
@@ -38,6 +39,11 @@ export class RemoteAuthorityResolverService implements IRemoteAuthorityResolverS
|
||||
return this._resolveAuthorityRequests[authority].promise;
|
||||
}
|
||||
|
||||
clearResolvedAuthority(authority: string): void {
|
||||
this._resolveAuthorityRequests[authority].reject(errors.canceled());
|
||||
delete this._resolveAuthorityRequests[authority];
|
||||
}
|
||||
|
||||
setResolvedAuthority(resolvedAuthority: ResolvedAuthority) {
|
||||
if (this._resolveAuthorityRequests[resolvedAuthority.authority]) {
|
||||
let request = this._resolveAuthorityRequests[resolvedAuthority.authority];
|
||||
|
||||
Reference in New Issue
Block a user