1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-18 18:33:50 +00:00

[PM-25884] Move Phishing Detection Safari check to PhishingDetectionSettingsService (#18042)

* Move safari check to phishing detection settings to expose to all places using phishing detection

* Remove duplicate comment
This commit is contained in:
Leslie Tilton
2025-12-19 11:58:14 -06:00
committed by jaasen-livefront
parent 1c2e8982c1
commit 692be2a362
5 changed files with 15 additions and 12 deletions

View File

@@ -1490,6 +1490,7 @@ export default class MainBackground {
this.billingAccountProfileStateService,
this.configService,
this.organizationService,
this.platformUtilsService,
this.stateProvider,
);

View File

@@ -5,7 +5,6 @@ import {
filter,
map,
merge,
of,
Subject,
switchMap,
tap,
@@ -112,17 +111,7 @@ export class PhishingDetectionService {
.messages$(PHISHING_DETECTION_CANCEL_COMMAND)
.pipe(switchMap((message) => BrowserApi.closeTab(message.tabId)));
// Phishing detection is unavailable on Safari due to platform limitations
if (BrowserApi.isSafariApi) {
logService.debug(
"[PhishingDetectionService] Disabling phishing detection service for Safari.",
);
}
// Watching for settings changes to enable/disable phishing detection
const phishingDetectionActive$ = BrowserApi.isSafariApi
? of(false)
: phishingDetectionSettingsService.on$;
const phishingDetectionActive$ = phishingDetectionSettingsService.on$;
const initSub = phishingDetectionActive$
.pipe(

View File

@@ -523,6 +523,7 @@ const safeProviders: SafeProvider[] = [
BillingAccountProfileStateService,
ConfigService,
OrganizationService,
PlatformUtilsService,
StateProvider,
],
}),