Skip to content

Commit

Permalink
maliciousSiteProtectionErrorPage feature flag -> maliciousSiteProtection
Browse files Browse the repository at this point in the history
  • Loading branch information
mallexxx committed Dec 10, 2024
1 parent 890480a commit d4c60ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ public class MaliciousSiteProtectionManager: MaliciousSiteDetecting {
}

private func setupBindings() {
if featureFlagger.isFeatureOn(.maliciousSiteProtectionErrorPage) {
if featureFlagger.isFeatureOn(.maliciousSiteProtection) {
subscribeToDetectionPreferences()
return
}

guard let overridesHandler = featureFlagger.localOverrides?.actionHandler as? FeatureFlagOverridesPublishingHandler<FeatureFlag> else { return }
featureFlagsCancellable = overridesHandler.flagDidChangePublisher
.filter { $0.0 == .maliciousSiteProtectionErrorPage }
.filter { $0.0 == .maliciousSiteProtection }
.sink { [weak self] change in
guard let self else { return }
if change.1 {
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/Preferences/View/PreferencesGeneralView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ extension Preferences {
}

// SECTION 7: Phishing Detection
if featureFlagger.isFeatureOn(.maliciousSiteProtectionErrorPage) {
if featureFlagger.isFeatureOn(.maliciousSiteProtection) {
PreferencePaneSection(UserText.maliciousSiteDetectionHeader, spacing: 0) {
PreferencePaneSubSection {
ToggleMenuItem(UserText.maliciousSiteDetectionIsEnabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import BrowserServicesKit
public enum FeatureFlag: String, CaseIterable {
case debugMenu
case sslCertificatesBypass
case maliciousSiteProtectionErrorPage
case maliciousSiteProtection

/// Add experimental atb parameter to SERP queries for internal users to display Privacy Reminder
/// https://app.asana.com/0/1199230911884351/1205979030848528/f
Expand Down Expand Up @@ -59,7 +59,7 @@ extension FeatureFlag: FeatureFlagDescribing {
case .htmlNewTabPage,
.isPrivacyProLaunchedROWOverride:
return true
case .maliciousSiteProtectionErrorPage:
case .maliciousSiteProtection:
return true
case .autofillPartialFormSaves:
return true
Expand Down Expand Up @@ -89,8 +89,8 @@ extension FeatureFlag: FeatureFlagDescribing {
return .remoteReleasable(.subfeature(AutofillSubfeature.unknownUsernameCategorization))
case .freemiumDBP:
return .remoteReleasable(.subfeature(DBPSubfeature.freemium))
case .maliciousSiteProtectionErrorPage:
return .remoteReleasable(.subfeature(MaliciousSiteProtectionSubfeature.allowErrorPage))
case .maliciousSiteProtection:
return .remoteReleasable(.feature(.maliciousSiteProtection))
case .contextualOnboarding:
return .remoteReleasable(.feature(.contextualOnboarding))
case .credentialsImportPromotionForExistingUsers:
Expand Down

0 comments on commit d4c60ee

Please sign in to comment.