mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
This reverts commit ca8628880b
.
This commit is contained in:
parent
bdbae39c3a
commit
8fa1ef54bc
@ -42,7 +42,6 @@ import { ELECTRON_SUPPORTS_SECURE_STORAGE } from "./platform/services/electron-p
|
|||||||
import { ElectronStateService } from "./platform/services/electron-state.service";
|
import { ElectronStateService } from "./platform/services/electron-state.service";
|
||||||
import { ElectronStorageService } from "./platform/services/electron-storage.service";
|
import { ElectronStorageService } from "./platform/services/electron-storage.service";
|
||||||
import { I18nMainService } from "./platform/services/i18n.main.service";
|
import { I18nMainService } from "./platform/services/i18n.main.service";
|
||||||
import { IllegalSecureStorageService } from "./platform/services/illegal-secure-storage-service";
|
|
||||||
import { ElectronMainMessagingService } from "./services/electron-main-messaging.service";
|
import { ElectronMainMessagingService } from "./services/electron-main-messaging.service";
|
||||||
|
|
||||||
export class Main {
|
export class Main {
|
||||||
@ -148,14 +147,11 @@ export class Main {
|
|||||||
|
|
||||||
this.environmentService = new EnvironmentService(stateProvider, accountService);
|
this.environmentService = new EnvironmentService(stateProvider, accountService);
|
||||||
|
|
||||||
// Note: secure storage service is not available and should not be called in the main background process.
|
|
||||||
const illegalSecureStorageService = new IllegalSecureStorageService();
|
|
||||||
|
|
||||||
this.tokenService = new TokenService(
|
this.tokenService = new TokenService(
|
||||||
singleUserStateProvider,
|
singleUserStateProvider,
|
||||||
globalStateProvider,
|
globalStateProvider,
|
||||||
ELECTRON_SUPPORTS_SECURE_STORAGE,
|
ELECTRON_SUPPORTS_SECURE_STORAGE,
|
||||||
illegalSecureStorageService,
|
this.storageService,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.migrationRunner = new MigrationRunner(
|
this.migrationRunner = new MigrationRunner(
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service";
|
|
||||||
import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage-options";
|
|
||||||
|
|
||||||
export class IllegalSecureStorageService implements AbstractStorageService {
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
get valuesRequireDeserialization(): boolean {
|
|
||||||
throw new Error("Method not implemented.");
|
|
||||||
}
|
|
||||||
has(key: string, options?: StorageOptions): Promise<boolean> {
|
|
||||||
throw new Error("Method not implemented.");
|
|
||||||
}
|
|
||||||
save<T>(key: string, obj: T, options?: StorageOptions): Promise<void> {
|
|
||||||
throw new Error("Method not implemented.");
|
|
||||||
}
|
|
||||||
async get<T>(key: string): Promise<T> {
|
|
||||||
throw new Error("Method not implemented.");
|
|
||||||
}
|
|
||||||
async set<T>(key: string, obj: T): Promise<void> {
|
|
||||||
throw new Error("Method not implemented.");
|
|
||||||
}
|
|
||||||
async remove(key: string): Promise<void> {
|
|
||||||
throw new Error("Method not implemented.");
|
|
||||||
}
|
|
||||||
async clear(): Promise<void> {
|
|
||||||
throw new Error("Method not implemented.");
|
|
||||||
}
|
|
||||||
}
|
|
@ -485,7 +485,12 @@ const typesafeProviders: Array<SafeProvider> = [
|
|||||||
safeProvider({
|
safeProvider({
|
||||||
provide: TokenServiceAbstraction,
|
provide: TokenServiceAbstraction,
|
||||||
useClass: TokenService,
|
useClass: TokenService,
|
||||||
deps: [SingleUserStateProvider, GlobalStateProvider, SUPPORTS_SECURE_STORAGE, SECURE_STORAGE],
|
deps: [
|
||||||
|
SingleUserStateProvider,
|
||||||
|
GlobalStateProvider,
|
||||||
|
SUPPORTS_SECURE_STORAGE,
|
||||||
|
AbstractStorageService,
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
safeProvider({
|
safeProvider({
|
||||||
provide: KeyGenerationServiceAbstraction,
|
provide: KeyGenerationServiceAbstraction,
|
||||||
|
Loading…
Reference in New Issue
Block a user