From a3be0e1f85674bb217f30a2ecd5def8e7289e033 Mon Sep 17 00:00:00 2001 From: Razvan Litianu Date: Mon, 27 Jan 2025 11:27:57 +0200 Subject: [PATCH 1/3] FXIOS-10904 Focus iOS: Send data deletion request when DAU ping is toggled off --- focus-ios/Blockzilla/AppDelegate.swift | 2 ++ focus-ios/Blockzilla/pings.yaml | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/focus-ios/Blockzilla/AppDelegate.swift b/focus-ios/Blockzilla/AppDelegate.swift index f594cb3b5437..b19fcaca21fe 100644 --- a/focus-ios/Blockzilla/AppDelegate.swift +++ b/focus-ios/Blockzilla/AppDelegate.swift @@ -358,6 +358,8 @@ extension AppDelegate { } } + GleanMetrics.Pings.shared.usageDeletionRequest.setEnabled(enabled: true) + if Settings.getToggle(.sendAnonymousUsageData) { UsageProfileManager.checkAndSetUsageProfileId() } else { diff --git a/focus-ios/Blockzilla/pings.yaml b/focus-ios/Blockzilla/pings.yaml index 7e7ada19f2a9..4a8725e3d8be 100644 --- a/focus-ios/Blockzilla/pings.yaml +++ b/focus-ios/Blockzilla/pings.yaml @@ -51,3 +51,26 @@ usage-reporting: include_info_sections: false ping_schedule: - baseline + +usage-deletion-request: + description: | + This ping is submitted when a user opts out of sending usage + frequency of Firefox to Mozilla. + Sent in response to user action. + include_client_id: false + send_if_empty: true + bugs: + - https://mozilla-hub.atlassian.net/browse/FXIOS-10902 + data_reviews: + - https://github.com/mozilla-mobile/firefox-ios/pull/24263 + notification_emails: + - glean-team@mozilla.com + - jrediger@mozilla.com + - loines@mozilla.com + metadata: + follows_collection_enabled: false + include_info_sections: false + reasons: + set_upload_enabled: | + The ping was submitted due to the usage-reporting data preference changing from + enabled to disabled. From 4a35d10612433246079f603ac72dc72d9e496d0b Mon Sep 17 00:00:00 2001 From: Razvan Litianu Date: Mon, 27 Jan 2025 11:29:30 +0200 Subject: [PATCH 2/3] Update links --- focus-ios/Blockzilla/pings.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/focus-ios/Blockzilla/pings.yaml b/focus-ios/Blockzilla/pings.yaml index 4a8725e3d8be..dd6a79c2ad09 100644 --- a/focus-ios/Blockzilla/pings.yaml +++ b/focus-ios/Blockzilla/pings.yaml @@ -60,9 +60,9 @@ usage-deletion-request: include_client_id: false send_if_empty: true bugs: - - https://mozilla-hub.atlassian.net/browse/FXIOS-10902 + - https://mozilla-hub.atlassian.net/browse/FXIOS-10904 data_reviews: - - https://github.com/mozilla-mobile/firefox-ios/pull/24263 + - https://github.com/mozilla-mobile/firefox-ios/pull/24339 notification_emails: - glean-team@mozilla.com - jrediger@mozilla.com From e22baf76ec7b58c94f4c05c51887ca4e95ce54c4 Mon Sep 17 00:00:00 2001 From: Razvan Litianu Date: Tue, 28 Jan 2025 13:22:48 +0200 Subject: [PATCH 3/3] Send if toggle off --- .../Settings/Controller/SettingsViewController.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/focus-ios/Blockzilla/Settings/Controller/SettingsViewController.swift b/focus-ios/Blockzilla/Settings/Controller/SettingsViewController.swift index c105aedcf1b7..c7a045ae5bdf 100644 --- a/focus-ios/Blockzilla/Settings/Controller/SettingsViewController.swift +++ b/focus-ios/Blockzilla/Settings/Controller/SettingsViewController.swift @@ -656,7 +656,9 @@ class SettingsViewController: UIViewController, UITableViewDataSource, UITableVi } else if toggle.setting == .biometricLogin { TipManager.biometricTip = false } else if toggle.setting == .dailyUsagePing { - // TODO: FXIOS-10904 Focus iOS: Send data deletion request when DAU ping is toggled off + if !sender.isOn { + GleanMetrics.Pings.shared.usageDeletionRequest.submit() + } } switch toggle.setting {