mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
Split native messaging into renderer and background service. Encrypt messages and verify timestamp
This commit is contained in:
@@ -18,6 +18,7 @@ import { isDev } from 'jslib/electron/utils';
|
||||
import { DeviceType } from 'jslib/enums/deviceType';
|
||||
|
||||
import { I18nService } from '../services/i18n.service';
|
||||
import { NativeMessagingService } from '../services/nativeMessaging.service';
|
||||
|
||||
import { AuthGuardService } from 'jslib/angular/services/auth-guard.service';
|
||||
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
|
||||
@@ -128,6 +129,7 @@ const environmentService = new EnvironmentService(apiService, storageService, no
|
||||
const eventService = new EventService(storageService, apiService, userService, cipherService);
|
||||
const systemService = new SystemService(storageService, vaultTimeoutService, messagingService, platformUtilsService,
|
||||
null);
|
||||
const nativeMessagingService = new NativeMessagingService(cryptoService, platformUtilsService)
|
||||
|
||||
const analytics = new Analytics(window, () => isDev(), platformUtilsService, storageService, appIdService);
|
||||
containerService.attachToGlobal(window);
|
||||
@@ -211,6 +213,7 @@ export function initFactory(): Function {
|
||||
{ provide: EventServiceAbstraction, useValue: eventService },
|
||||
{ provide: PolicyServiceAbstraction, useValue: policyService },
|
||||
{ provide: CryptoFunctionServiceAbstraction, useValue: cryptoFunctionService },
|
||||
{ provide: NativeMessagingService, useValue: nativeMessagingService },
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useFactory: initFactory,
|
||||
|
||||
Reference in New Issue
Block a user