From 998e5e2ea676c1fb937f72048edea5ec85b433a6 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Mon, 4 Jan 2021 22:19:55 -0800 Subject: [PATCH] onDidChangePassword -> onDidChange in secrets API --- extensions/github-authentication/src/github.ts | 2 +- extensions/microsoft-authentication/src/AADHelper.ts | 2 +- src/vs/vscode.proposed.d.ts | 2 +- src/vs/workbench/api/common/extHostSecrets.ts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/github-authentication/src/github.ts b/extensions/github-authentication/src/github.ts index 6b97805b199..f065556bd26 100644 --- a/extensions/github-authentication/src/github.ts +++ b/extensions/github-authentication/src/github.ts @@ -40,7 +40,7 @@ export class GitHubAuthenticationProvider { // Ignore, network request failed } - context.subscriptions.push(context.secretState.onDidChangePassword(() => this.checkForUpdates())); + context.subscriptions.push(context.secretState.onDidChange(() => this.checkForUpdates())); } private async verifySessions(): Promise { diff --git a/extensions/microsoft-authentication/src/AADHelper.ts b/extensions/microsoft-authentication/src/AADHelper.ts index 62c53de6c28..3bfe6876cd8 100644 --- a/extensions/microsoft-authentication/src/AADHelper.ts +++ b/extensions/microsoft-authentication/src/AADHelper.ts @@ -149,7 +149,7 @@ export class AzureActiveDirectoryService { } } - this._disposables.push(this._context.secretState.onDidChangePassword(() => this.checkForUpdates)); + this._disposables.push(this._context.secretState.onDidChange(() => this.checkForUpdates)); } private parseStoredData(data: string): IStoredSession[] { diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 092885bb0d6..5f0c5c685a7 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -2367,7 +2367,7 @@ declare module 'vscode' { /** * Fires when a secret is set or deleted. */ - onDidChangePassword: Event; + onDidChange: Event; } export interface ExtensionContext { secretState: SecretState; diff --git a/src/vs/workbench/api/common/extHostSecrets.ts b/src/vs/workbench/api/common/extHostSecrets.ts index 0bac101e4bf..38f49e07aff 100644 --- a/src/vs/workbench/api/common/extHostSecrets.ts +++ b/src/vs/workbench/api/common/extHostSecrets.ts @@ -14,15 +14,15 @@ export class ExtensionSecrets implements vscode.SecretState { protected readonly _id: string; protected readonly _secretState: ExtHostSecretState; - private _onDidChangePassword = new Emitter(); - readonly onDidChangePassword: Event = this._onDidChangePassword.event; + private _onDidChange = new Emitter(); + readonly onDidChange: Event = this._onDidChange.event; constructor(extensionDescription: IExtensionDescription, secretState: ExtHostSecretState) { this._id = ExtensionIdentifier.toKey(extensionDescription.identifier); this._secretState = secretState; - this._secretState.onDidChangePassword(_ => this._onDidChangePassword.fire()); + this._secretState.onDidChangePassword(_ => this._onDidChange.fire()); } get(key: string): Promise {