Skip to content

Commit

Permalink
DBP waitlist removal (#3074)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1203581873609357/1206988388191940
Tech Design URL:
CC:

**Description**:
This PR removes all DBP waitlist references and pixels

**Steps to test this PR**:
1. Smoke test DBP feature

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

**Definition of Done**:

* [ ] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

---
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)
  • Loading branch information
SlayterDev authored Aug 7, 2024
1 parent bdb1671 commit 0257003
Show file tree
Hide file tree
Showing 42 changed files with 18 additions and 1,081 deletions.
2 changes: 1 addition & 1 deletion Configuration/App/DBP/DuckDuckGoDBPAgent.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*] =
PROVISIONING_PROFILE_SPECIFIER[config=Review][sdk=macosx*] = macOS DBP Agent - Review
PROVISIONING_PROFILE_SPECIFIER[config=Release][sdk=macosx*] = macOS DBP Agent - Release

FEATURE_FLAGS = FEEDBACK DBP
FEATURE_FLAGS = FEEDBACK

GCC_PREPROCESSOR_DEFINITIONS[arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1
GCC_PREPROCESSOR_DEFINITIONS[config=CI][arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1 DEBUG=1 CI=1 $(inherited)
Expand Down
2 changes: 1 addition & 1 deletion Configuration/App/DBP/DuckDuckGoDBPAgentAppStore.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*] =
PROVISIONING_PROFILE_SPECIFIER[config=Review][sdk=macosx*] = match AppStore com.duckduckgo.mobile.ios.DBP.backgroundAgent.review macos
PROVISIONING_PROFILE_SPECIFIER[config=Release][sdk=macosx*] = match AppStore com.duckduckgo.mobile.ios.DBP.backgroundAgent macos

FEATURE_FLAGS = FEEDBACK DBP
FEATURE_FLAGS = FEEDBACK

GCC_PREPROCESSOR_DEFINITIONS[arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1
GCC_PREPROCESSOR_DEFINITIONS[config=CI][arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1 DEBUG=1 CI=1 $(inherited)
Expand Down
2 changes: 1 addition & 1 deletion Configuration/App/DuckDuckGo.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CODE_SIGN_IDENTITY[sdk=macosx*] = Developer ID Application
CODE_SIGN_IDENTITY[config=Debug][sdk=macosx*] = Apple Development
CODE_SIGN_IDENTITY[config=CI][sdk=macosx*] =

FEATURE_FLAGS = FEEDBACK SPARKLE DBP STRIPE
FEATURE_FLAGS = FEEDBACK SPARKLE STRIPE

PRODUCT_NAME_PREFIX = DuckDuckGo

Expand Down
2 changes: 1 addition & 1 deletion Configuration/Common.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ COMBINE_HIDPI_IMAGES = YES
DEVELOPMENT_TEAM = HKE973VLUW
DEVELOPMENT_TEAM[config=CI][sdk=*] =

FEATURE_FLAGS = FEEDBACK DBP
FEATURE_FLAGS = FEEDBACK

GCC_PREPROCESSOR_DEFINITIONS[config=CI][arch=*][sdk=*] = DEBUG=1 CI=1 $(inherited)
GCC_PREPROCESSOR_DEFINITIONS[config=Debug][arch=*][sdk=*] = DEBUG=1 $(inherited)
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Tests/IntegrationTests.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

MACOSX_DEPLOYMENT_TARGET = 11.4

FEATURE_FLAGS = FEEDBACK DBP
FEATURE_FLAGS = FEEDBACK

INFOPLIST_FILE = IntegrationTests/Info.plist
PRODUCT_BUNDLE_IDENTIFIER = com.duckduckgo.Integration-Tests
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Tests/UnitTests.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES

FEATURE_FLAGS = FEEDBACK DBP
FEATURE_FLAGS = FEEDBACK

INFOPLIST_FILE = UnitTests/Info.plist
PRODUCT_BUNDLE_IDENTIFIER = com.duckduckgo.macos.browser.DuckDuckGoTests
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Tests/UnitTestsAppStore.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "UnitTests.xcconfig"
#include "../AppStore.xcconfig"

FEATURE_FLAGS = FEEDBACK DBP
FEATURE_FLAGS = FEEDBACK

PRODUCT_BUNDLE_IDENTIFIER = com.duckduckgo.mobile.ios.DuckDuckGoTests

Expand Down
12 changes: 0 additions & 12 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1322,8 +1322,6 @@
4B9DB0422A983B24000927DB /* WaitlistDialogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9DB0182A983B24000927DB /* WaitlistDialogView.swift */; };
4B9DB0442A983B24000927DB /* WaitlistModalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9DB0192A983B24000927DB /* WaitlistModalViewController.swift */; };
4B9DB0452A983B24000927DB /* WaitlistModalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9DB0192A983B24000927DB /* WaitlistModalViewController.swift */; };
4B9DB0472A983B24000927DB /* WaitlistRootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9DB01A2A983B24000927DB /* WaitlistRootView.swift */; };
4B9DB0482A983B24000927DB /* WaitlistRootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9DB01A2A983B24000927DB /* WaitlistRootView.swift */; };
4B9DB04A2A983B24000927DB /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9DB01C2A983B24000927DB /* NotificationService.swift */; };
4B9DB04B2A983B24000927DB /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9DB01C2A983B24000927DB /* NotificationService.swift */; };
4B9DB0542A983B55000927DB /* MockWaitlistStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9DB04F2A983B55000927DB /* MockWaitlistStorage.swift */; };
Expand Down Expand Up @@ -2542,8 +2540,6 @@
BBB881892C4029BA001247C6 /* BookmarkListTreeControllerSearchDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB881872C4029BA001247C6 /* BookmarkListTreeControllerSearchDataSource.swift */; };
BBBEE1BF2C4FF63600035ABA /* SortBookmarksViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBBEE1BE2C4FF63600035ABA /* SortBookmarksViewModelTests.swift */; };
BBBEE1C02C4FF63600035ABA /* SortBookmarksViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBBEE1BE2C4FF63600035ABA /* SortBookmarksViewModelTests.swift */; };
BBDFDC5A2B2B8A0900F62D90 /* DataBrokerProtectionExternalWaitlistPixels.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBDFDC592B2B8A0900F62D90 /* DataBrokerProtectionExternalWaitlistPixels.swift */; };
BBDFDC5D2B2B8E2100F62D90 /* DataBrokerProtectionExternalWaitlistPixels.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBDFDC592B2B8A0900F62D90 /* DataBrokerProtectionExternalWaitlistPixels.swift */; };
BBFB727F2C48047C0088884C /* SortBookmarksViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBFB727E2C48047C0088884C /* SortBookmarksViewModel.swift */; };
BBFB72802C48047C0088884C /* SortBookmarksViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBFB727E2C48047C0088884C /* SortBookmarksViewModel.swift */; };
BBFF355D2C4AF26200DA3289 /* BookmarksSortModeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBFF355C2C4AF26200DA3289 /* BookmarksSortModeTests.swift */; };
Expand Down Expand Up @@ -3382,7 +3378,6 @@
4B9DB0172A983B24000927DB /* JoinWaitlistView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JoinWaitlistView.swift; sourceTree = "<group>"; };
4B9DB0182A983B24000927DB /* WaitlistDialogView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WaitlistDialogView.swift; sourceTree = "<group>"; };
4B9DB0192A983B24000927DB /* WaitlistModalViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WaitlistModalViewController.swift; sourceTree = "<group>"; };
4B9DB01A2A983B24000927DB /* WaitlistRootView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WaitlistRootView.swift; sourceTree = "<group>"; };
4B9DB01C2A983B24000927DB /* NotificationService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
4B9DB04F2A983B55000927DB /* MockWaitlistStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockWaitlistStorage.swift; sourceTree = "<group>"; };
4B9DB0502A983B55000927DB /* MockNotificationService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockNotificationService.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4229,7 +4224,6 @@
BB7B5F972C4ED73800BA4AF8 /* BookmarksSearchAndSortMetrics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSearchAndSortMetrics.swift; sourceTree = "<group>"; };
BBB881872C4029BA001247C6 /* BookmarkListTreeControllerSearchDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkListTreeControllerSearchDataSource.swift; sourceTree = "<group>"; };
BBBEE1BE2C4FF63600035ABA /* SortBookmarksViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SortBookmarksViewModelTests.swift; sourceTree = "<group>"; };
BBDFDC592B2B8A0900F62D90 /* DataBrokerProtectionExternalWaitlistPixels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataBrokerProtectionExternalWaitlistPixels.swift; sourceTree = "<group>"; };
BBFB727E2C48047C0088884C /* SortBookmarksViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SortBookmarksViewModel.swift; sourceTree = "<group>"; };
BBFF355C2C4AF26200DA3289 /* BookmarksSortModeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSortModeTests.swift; sourceTree = "<group>"; };
BD384AC72BBC821100EF3735 /* vpn-light-mode.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "vpn-light-mode.json"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4830,7 +4824,6 @@
316913252BD2B76F0051B46D /* DataBrokerPrerequisitesStatusVerifier.swift */,
3199C6FC2AF97367002A7BA1 /* DataBrokerProtectionAppEvents.swift */,
316850712AF3AD58009A2828 /* DataBrokerProtectionDebugMenu.swift */,
BBDFDC592B2B8A0900F62D90 /* DataBrokerProtectionExternalWaitlistPixels.swift */,
3199C6F82AF94F5B002A7BA1 /* DataBrokerProtectionFeatureDisabler.swift */,
31C5FFB82AF64D120008A79F /* DataBrokerProtectionFeatureGatekeeper.swift */,
F1C70D782BFF50A400599292 /* DataBrokerProtectionLoginItemInterface.swift */,
Expand Down Expand Up @@ -5771,7 +5764,6 @@
4B9DB0182A983B24000927DB /* WaitlistDialogView.swift */,
4B9DB0192A983B24000927DB /* WaitlistModalViewController.swift */,
3168506C2AF3AD1C009A2828 /* WaitlistViewControllerPresenter.swift */,
4B9DB01A2A983B24000927DB /* WaitlistRootView.swift */,
4B520F622BA5573A006405C7 /* WaitlistThankYouView.swift */,
4B6B64832BA930420009FF9F /* WaitlistThankYouPromptPresenter.swift */,
);
Expand Down Expand Up @@ -10046,10 +10038,8 @@
3706FAFD293F65D500E42796 /* DownloadsPopover.swift in Sources */,
3706FAFE293F65D500E42796 /* SpacerNode.swift in Sources */,
3706FB00293F65D500E42796 /* PasswordManagementCreditCardModel.swift in Sources */,
BBDFDC5D2B2B8E2100F62D90 /* DataBrokerProtectionExternalWaitlistPixels.swift in Sources */,
3706FB01293F65D500E42796 /* NSEventExtension.swift in Sources */,
3706FB02293F65D500E42796 /* Onboarding.swift in Sources */,
4B9DB0482A983B24000927DB /* WaitlistRootView.swift in Sources */,
3706FEB8293F6EFB00E42796 /* ConnectBitwardenView.swift in Sources */,
1DFAB51E2A8982A600A0F7F6 /* SetExtension.swift in Sources */,
B60C6F8E29B200AB007BFAA8 /* SavePanelAccessoryView.swift in Sources */,
Expand Down Expand Up @@ -11511,7 +11501,6 @@
9F6434612BEC82B700D2D8A0 /* AttributionPixelHandler.swift in Sources */,
B684592225C93BE000DC17B6 /* Publisher.asVoid.swift in Sources */,
4B9DB01D2A983B24000927DB /* Waitlist.swift in Sources */,
BBDFDC5A2B2B8A0900F62D90 /* DataBrokerProtectionExternalWaitlistPixels.swift in Sources */,
AAA0CC33252F181A0079BC96 /* NavigationButtonMenuDelegate.swift in Sources */,
1DA84D2F2C11989D0011C80F /* Update.swift in Sources */,
AAC30A2A268E239100D2D9CD /* CrashReport.swift in Sources */,
Expand Down Expand Up @@ -11910,7 +11899,6 @@
AA7EB6E527E7D6DC00036718 /* AnimationView.swift in Sources */,
8562599A269CA0A600EE44BC /* NSRectExtension.swift in Sources */,
4B37EE5F2B4CFC3C00A89A61 /* HomePageRemoteMessagingStorage.swift in Sources */,
4B9DB0472A983B24000927DB /* WaitlistRootView.swift in Sources */,
31F28C5128C8EEC500119F70 /* YoutubeOverlayUserScript.swift in Sources */,
B6ABD0CA2BC03F610000EB69 /* SecurityScopedFileURLController.swift in Sources */,
B6040856274B830F00680351 /* DictionaryExtension.swift in Sources */,
Expand Down
10 changes: 0 additions & 10 deletions DuckDuckGo/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,13 @@ final class AppDelegate: NSObject, NSApplicationDelegate {

// MARK: - DBP

#if DBP
private lazy var dataBrokerProtectionSubscriptionEventHandler: DataBrokerProtectionSubscriptionEventHandler = {
let authManager = DataBrokerAuthenticationManagerBuilder.buildAuthenticationManager(subscriptionManager: subscriptionManager)
return DataBrokerProtectionSubscriptionEventHandler(featureDisabler: DataBrokerProtectionFeatureDisabler(),
authenticationManager: authManager,
pixelHandler: DataBrokerProtectionPixelsHandler())
}()

#endif

private lazy var vpnRedditSessionWorkaround: VPNRedditSessionWorkaround = {
let ipcClient = VPNControllerXPCClient.shared
let statusReporter = DefaultNetworkProtectionStatusReporter(
Expand Down Expand Up @@ -374,13 +371,8 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
NetworkProtectionAppEvents(featureGatekeeper: DefaultVPNFeatureGatekeeper(subscriptionManager: subscriptionManager)).applicationDidFinishLaunching()
UNUserNotificationCenter.current().delegate = self

#if DBP
dataBrokerProtectionSubscriptionEventHandler.registerForSubscriptionAccountManagerEvents()
#endif

#if DBP
DataBrokerProtectionAppEvents(featureGatekeeper: DefaultDataBrokerProtectionFeatureGatekeeper(accountManager: subscriptionManager.accountManager)).applicationDidFinishLaunching()
#endif

setUpAutoClearHandler()

Expand Down Expand Up @@ -427,11 +419,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate {

NetworkProtectionAppEvents(featureGatekeeper: DefaultVPNFeatureGatekeeper(subscriptionManager: subscriptionManager)).applicationDidBecomeActive()

#if DBP
DataBrokerProtectionAppEvents(featureGatekeeper:
DefaultDataBrokerProtectionFeatureGatekeeper(accountManager:
subscriptionManager.accountManager)).applicationDidBecomeActive()
#endif

subscriptionManager.refreshCachedSubscriptionAndEntitlements { isSubscriptionActive in
if isSubscriptionActive {
Expand Down
7 changes: 0 additions & 7 deletions DuckDuckGo/Application/URLEventHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ import PixelKit
import Subscription
import NetworkProtectionUI
import VPNAppLauncher

#if DBP
import DataBrokerProtection
#endif

// @MainActor
final class URLEventHandler {
Expand Down Expand Up @@ -117,11 +114,9 @@ final class URLEventHandler {
}
}

#if DBP
if url.scheme?.isDataBrokerProtectionScheme == true {
handleDataBrokerProtectionURL(url)
}
#endif

DispatchQueue.main.async {
if url.isFileURL && url.pathExtension == WebKitDownloadTask.downloadExtension {
Expand All @@ -146,7 +141,6 @@ final class URLEventHandler {
}
}

#if DBP
/// Handles DBP URLs
///
private static func handleDataBrokerProtectionURL(_ url: URL) {
Expand All @@ -160,7 +154,6 @@ final class URLEventHandler {
return
}
}
#endif
}

private extension String {
Expand Down
4 changes: 0 additions & 4 deletions DuckDuckGo/Common/Extensions/BundleExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ extension Bundle {

static let ipcAppGroup = "IPC_APP_GROUP"

#if DBP
static let dbpBackgroundAgentBundleId = "DBP_BACKGROUND_AGENT_BUNDLE_ID"
static let dbpBackgroundAgentProductName = "DBP_BACKGROUND_AGENT_PRODUCT_NAME"
#endif
}

var buildNumber: String {
Expand Down Expand Up @@ -87,7 +85,6 @@ extension Bundle {
}
#endif

#if DBP
var dbpBackgroundAgentBundleId: String {
guard let bundleID = object(forInfoDictionaryKey: Keys.dbpBackgroundAgentBundleId) as? String else {
fatalError("Info.plist is missing \(Keys.dbpBackgroundAgentBundleId)")
Expand All @@ -101,7 +98,6 @@ extension Bundle {
}
return loginItemsURL.appendingPathComponent(productName + ".app")
}
#endif

func appGroup(bundle: BundleGroup) -> String {
let appGroupName = bundle.appGroupKey
Expand Down
Loading

0 comments on commit 0257003

Please sign in to comment.