From ef561b78e267ded84a30ed1c28409b7197dbde6f Mon Sep 17 00:00:00 2001 From: Jimmy Vo Date: Thu, 10 Apr 2025 17:06:41 -0400 Subject: [PATCH] [PM-19814] Move phishing service to phishing directory --- apps/browser/src/background/main.background.ts | 2 +- .../background}/phishing-detection.service.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) rename apps/browser/src/{platform/services => phishing-detection/background}/phishing-detection.service.ts (99%) diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index a46b5daef74..2e0db947a59 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -256,6 +256,7 @@ import { InlineMenuFieldQualificationService } from "../autofill/services/inline import { SafariApp } from "../browser/safariApp"; import { BackgroundBrowserBiometricsService } from "../key-management/biometrics/background-browser-biometrics.service"; import VaultTimeoutService from "../key-management/vault-timeout/vault-timeout.service"; +import { PhishingDetectionService } from "../phishing-detection/background/phishing-detection.service"; import { BrowserApi } from "../platform/browser/browser-api"; import { flagEnabled } from "../platform/flags"; import { UpdateBadge } from "../platform/listeners/update-badge"; @@ -272,7 +273,6 @@ import BrowserMemoryStorageService from "../platform/services/browser-memory-sto import { BrowserScriptInjectorService } from "../platform/services/browser-script-injector.service"; import I18nService from "../platform/services/i18n.service"; import { LocalBackedSessionStorageService } from "../platform/services/local-backed-session-storage.service"; -import { PhishingDetectionService } from "../platform/services/phishing-detection.service"; import { BackgroundPlatformUtilsService } from "../platform/services/platform-utils/background-platform-utils.service"; import { BrowserPlatformUtilsService } from "../platform/services/platform-utils/browser-platform-utils.service"; import { PopupViewCacheBackgroundService } from "../platform/services/popup-view-cache-background.service"; diff --git a/apps/browser/src/platform/services/phishing-detection.service.ts b/apps/browser/src/phishing-detection/background/phishing-detection.service.ts similarity index 99% rename from apps/browser/src/platform/services/phishing-detection.service.ts rename to apps/browser/src/phishing-detection/background/phishing-detection.service.ts index 2711dfdab88..9748282e5d5 100644 --- a/apps/browser/src/platform/services/phishing-detection.service.ts +++ b/apps/browser/src/phishing-detection/background/phishing-detection.service.ts @@ -7,7 +7,8 @@ import { ScheduledTaskNames } from "@bitwarden/common/platform/scheduling"; import { TaskSchedulerService } from "@bitwarden/common/platform/scheduling/task-scheduler.service"; import { PhishingDetectionCommands } from "../../phishing-detection/phishing-detection.enum"; -import { BrowserApi } from "../browser/browser-api"; +import { BrowserApi } from "../../platform/browser/browser-api"; + export class PhishingDetectionService { private static knownPhishingDomains = new Set(); private static lastUpdateTime: number = 0;