mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
storage - change main storage service to support global and workspace storage (stubs)
This commit is contained in:
@@ -59,7 +59,7 @@ import { localize } from 'vs/nls';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { SnapUpdateService } from 'vs/platform/update/electron-main/updateService.snap';
|
||||
import { IStorageMainService, StorageMainService } from 'vs/platform/storage/node/storageMainService';
|
||||
import { GlobalStorageDatabaseChannel } from 'vs/platform/storage/node/storageIpc';
|
||||
import { StorageDatabaseChannel } from 'vs/platform/storage/node/storageIpc';
|
||||
import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainService';
|
||||
import { IBackupMainService } from 'vs/platform/backup/electron-main/backup';
|
||||
import { WorkspacesHistoryMainService, IWorkspacesHistoryMainService } from 'vs/platform/workspaces/electron-main/workspacesHistoryMainService';
|
||||
@@ -582,7 +582,7 @@ export class CodeApplication extends Disposable {
|
||||
// Storage
|
||||
const storageMainService = new StorageMainService(this.logService, this.environmentService);
|
||||
services.set(IStorageMainService, storageMainService);
|
||||
this.lifecycleMainService.onWillShutdown(e => e.join(storageMainService.close()));
|
||||
this.lifecycleMainService.onWillShutdown(e => e.join(storageMainService.globalStorage.close()));
|
||||
|
||||
// Backups
|
||||
const backupMainService = new BackupMainService(this.environmentService, this.configurationService, this.logService);
|
||||
@@ -666,7 +666,7 @@ export class CodeApplication extends Disposable {
|
||||
mainProcessElectronServer.registerChannel('webview', webviewChannel);
|
||||
|
||||
// Storage (main & shared process)
|
||||
const storageChannel = this._register(new GlobalStorageDatabaseChannel(this.logService, accessor.get(IStorageMainService)));
|
||||
const storageChannel = this._register(new StorageDatabaseChannel(this.logService, accessor.get(IStorageMainService)));
|
||||
mainProcessElectronServer.registerChannel('storage', storageChannel);
|
||||
sharedProcessClient.then(client => client.registerChannel('storage', storageChannel));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user