1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 22:33:35 +00:00

[AC-2249] Remove StateService from PolicyApiService (#8106)

This was unused.
This commit is contained in:
Thomas Rittson
2024-03-02 07:59:45 +10:00
committed by GitHub
parent f95ff93a71
commit ad21a1d160
5 changed files with 4 additions and 30 deletions

View File

@@ -492,11 +492,7 @@ export default class MainBackground {
this.policyService,
);
this.badgeSettingsService = new BadgeSettingsService(this.stateProvider);
this.policyApiService = new PolicyApiService(
this.policyService,
this.apiService,
this.stateService,
);
this.policyApiService = new PolicyApiService(this.policyService, this.apiService);
this.keyConnectorService = new KeyConnectorService(
this.stateService,
this.cryptoService,

View File

@@ -24,13 +24,8 @@ import { SettingsService } from "@bitwarden/common/abstractions/settings.service
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service";
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout.service";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction";
import {
InternalPolicyService,
PolicyService,
} from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service";
import { PolicyApiService } from "@bitwarden/common/admin-console/services/policy/policy-api.service";
import { AccountService as AccountServiceAbstraction } from "@bitwarden/common/auth/abstractions/account.service";
import { AuthService as AuthServiceAbstraction } from "@bitwarden/common/auth/abstractions/auth.service";
import { DeviceTrustCryptoServiceAbstraction } from "@bitwarden/common/auth/abstractions/device-trust-crypto.service.abstraction";
@@ -312,17 +307,6 @@ function getBgService<T>(service: keyof MainBackground) {
},
deps: [StateServiceAbstraction, StateProvider, OrganizationService],
},
{
provide: PolicyApiServiceAbstraction,
useFactory: (
policyService: InternalPolicyService,
apiService: ApiService,
stateService: StateService,
) => {
return new PolicyApiService(policyService, apiService, stateService);
},
deps: [InternalPolicyService, ApiService, StateService],
},
{
provide: PlatformUtilsService,
useFactory: getBgService<PlatformUtilsService>("platformUtilsService"),

View File

@@ -384,11 +384,7 @@ export class Main {
this.organizationService,
);
this.policyApiService = new PolicyApiService(
this.policyService,
this.apiService,
this.stateService,
);
this.policyApiService = new PolicyApiService(this.policyService, this.apiService);
this.keyConnectorService = new KeyConnectorService(
this.stateService,