diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index 572e45a8063..a46b5daef74 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -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() { diff --git a/apps/browser/src/platform/services/phishing-detection.service.ts b/apps/browser/src/platform/services/phishing-detection.service.ts index 9c72a68ea66..2711dfdab88 100644 --- a/apps/browser/src/platform/services/phishing-detection.service.ts +++ b/apps/browser/src/platform/services/phishing-detection.service.ts @@ -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() {