Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandeep Somavarapu <sasomava@microsoft.com>2022-09-12 18:50:06 +0300
committerSandeep Somavarapu <sasomava@microsoft.com>2022-09-12 18:50:06 +0300
commitf0fc8a0a63920ed34ccbd70ccb43e2048cad0780 (patch)
tree59970751994e803ee326de127aa7daa8ad97ced4
parent9cc45c4287452c7bc421e58204689cadf7325eda (diff)
review feedback
-rw-r--r--src/vs/platform/storage/common/profileStorageService.ts10
-rw-r--r--src/vs/platform/storage/common/storage.ts8
-rw-r--r--src/vs/platform/storage/electron-main/storageMainService.ts2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/vs/platform/storage/common/profileStorageService.ts b/src/vs/platform/storage/common/profileStorageService.ts
index efbaed5c301..645a94c9308 100644
--- a/src/vs/platform/storage/common/profileStorageService.ts
+++ b/src/vs/platform/storage/common/profileStorageService.ts
@@ -53,7 +53,7 @@ export abstract class AbstractProfileStorageService extends Disposable implement
_serviceBrand: undefined;
- abstract onDidChange: Event<IProfileStorageChanges>;
+ readonly abstract onDidChange: Event<IProfileStorageChanges>;
constructor(
@IStorageService protected readonly storageService: IStorageService
@@ -68,7 +68,7 @@ export abstract class AbstractProfileStorageService extends Disposable implement
}
const storageDatabase = await this.createStorageDatabase(profile);
- const storageService = new StroageService(storageDatabase);
+ const storageService = new StorageService(storageDatabase);
try {
await storageService.initialize();
return this.getItems(storageService);
@@ -85,7 +85,7 @@ export abstract class AbstractProfileStorageService extends Disposable implement
}
const storageDatabase = await this.createStorageDatabase(profile);
- const storageService = new StroageService(storageDatabase);
+ const storageService = new StorageService(storageDatabase);
try {
await storageService.initialize();
this.writeItems(storageService, data, target);
@@ -127,12 +127,12 @@ export abstract class AbstractProfileStorageService extends Disposable implement
protected abstract createStorageDatabase(profile: IUserDataProfile): Promise<IStorageDatabase>;
}
-class StroageService extends AbstractStorageService {
+class StorageService extends AbstractStorageService {
private readonly profileStorage: IStorage;
constructor(profileStorageDatabase: IStorageDatabase) {
- super({ flushInterval: 100, donotMarkPerf: true });
+ super({ flushInterval: 100, doNotMarkPerf: true });
this.profileStorage = this._register(new Storage(profileStorageDatabase));
}
diff --git a/src/vs/platform/storage/common/storage.ts b/src/vs/platform/storage/common/storage.ts
index 1e18438e19f..91491675ed7 100644
--- a/src/vs/platform/storage/common/storage.ts
+++ b/src/vs/platform/storage/common/storage.ts
@@ -235,8 +235,8 @@ interface IKeyTargets {
}
export interface IStorageServiceOptions {
- flushInterval: number;
- donotMarkPerf?: boolean;
+ readonly flushInterval: number;
+ readonly doNotMarkPerf?: boolean;
}
export function loadKeyTargets(storage: IStorage): IKeyTargets {
@@ -298,7 +298,7 @@ export abstract class AbstractStorageService extends Disposable implements IStor
if (!this.initializationPromise) {
this.initializationPromise = (async () => {
- if (!this.options.donotMarkPerf) {
+ if (!this.options.doNotMarkPerf) {
// Init all storage locations
mark('code/willInitStorage');
}
@@ -306,7 +306,7 @@ export abstract class AbstractStorageService extends Disposable implements IStor
// Ask subclasses to initialize storage
await this.doInitialize();
} finally {
- if (!this.options.donotMarkPerf) {
+ if (!this.options.doNotMarkPerf) {
mark('code/didInitStorage');
}
}
diff --git a/src/vs/platform/storage/electron-main/storageMainService.ts b/src/vs/platform/storage/electron-main/storageMainService.ts
index e60bcf8b869..b0332ba9687 100644
--- a/src/vs/platform/storage/electron-main/storageMainService.ts
+++ b/src/vs/platform/storage/electron-main/storageMainService.ts
@@ -189,7 +189,7 @@ export class StorageMainService extends Disposable implements IStorageMainServic
profileStorage = this.createProfileStorage(profile);
this.mapProfileToStorage.set(profile.id, profileStorage);
- profileStorage.onDidChangeStorage(e => this._onDidChangeProfileStorageData.fire({ ...e, storage: profileStorage!, profile }));
+ this._register(profileStorage.onDidChangeStorage(e => this._onDidChangeProfileStorageData.fire({ ...e, storage: profileStorage!, profile })));
once(profileStorage.onDidCloseStorage)(() => {
this.logService.trace(`StorageMainService: closed profile storage (${profile.name})`);