1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-10 13:40:06 +00:00

[PM-19814] Add phishing detection feature flag.

This commit is contained in:
Jimmy Vo
2025-04-10 16:32:53 -04:00
parent 37c1935f7c
commit 4bb31b8f74
2 changed files with 19 additions and 6 deletions

View File

@@ -1310,12 +1310,23 @@ export default class MainBackground {
this.inlineMenuFieldQualificationService = new InlineMenuFieldQualificationService();
PhishingDetectionService.initialize(
this.auditService,
this.logService,
this.storageService,
this.taskSchedulerService,
);
this.configService
.getFeatureFlag(FeatureFlag.PhishingDetection)
.then((enabled) => {
if (enabled) {
PhishingDetectionService.initialize(
this.auditService,
this.logService,
this.storageService,
this.taskSchedulerService,
);
} else {
this.logService.info("phishing detection feature flag is disabled.");
}
})
.catch((error) =>
this.logService.error("Failed to check phishing detection feature flag", error),
);
}
async bootstrap() {

View File

@@ -54,6 +54,8 @@ export class PhishingDetectionService {
// Set up periodic updates every 24 hours
this.setupPeriodicUpdates();
PhishingDetectionService.logService.info("Phishing detection feature is initialized.");
}
private static setupPeriodicUpdates() {