mark secretState field as private

This commit is contained in:
Rachel Macfarlane
2021-01-21 21:32:58 -08:00
parent 4b9ccf578c
commit e61d0ba267

View File

@@ -12,7 +12,7 @@ import { Emitter, Event } from 'vs/base/common/event';
export class ExtensionSecrets implements vscode.SecretStorage {
protected readonly _id: string;
protected readonly _secretState: ExtHostSecretState;
readonly #secretState: ExtHostSecretState;
private _onDidChange = new Emitter<vscode.SecretStorageChangeEvent>();
readonly onDidChange: Event<vscode.SecretStorageChangeEvent> = this._onDidChange.event;
@@ -20,9 +20,9 @@ export class ExtensionSecrets implements vscode.SecretStorage {
constructor(extensionDescription: IExtensionDescription, secretState: ExtHostSecretState) {
this._id = ExtensionIdentifier.toKey(extensionDescription.identifier);
this._secretState = secretState;
this.#secretState = secretState;
this._secretState.onDidChangePassword(e => {
this.#secretState.onDidChangePassword(e => {
if (e.extensionId === this._id) {
this._onDidChange.fire({ key: e.key });
}
@@ -30,14 +30,14 @@ export class ExtensionSecrets implements vscode.SecretStorage {
}
get(key: string): Promise<string | undefined> {
return this._secretState.get(this._id, key);
return this.#secretState.get(this._id, key);
}
store(key: string, value: string): Promise<void> {
return this._secretState.store(this._id, key, value);
return this.#secretState.store(this._id, key, value);
}
delete(key: string): Promise<void> {
return this._secretState.delete(this._id, key);
return this.#secretState.delete(this._id, key);
}
}