Skip to content

Commit 5c66702

Browse files
authored
Add FXIOS-10605 [ToS] Firefox iOS: Nimbus Flag for ToS (#23251)
* FXIOS-10605 Firefox iOS: Nimbus Flag for ToS * Removed ToS feature from FeatureDebugViewController
1 parent 2b7ae75 commit 5c66702

4 files changed

Lines changed: 29 additions & 0 deletions

File tree

firefox-ios/Client/FeatureFlags/NimbusFlaggableFeature.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ enum NimbusFeatureFlagID: String, CaseIterable {
4444
case toolbarRefactor
4545
case toolbarOneTapNewTab
4646
case toolbarNavigationHint
47+
case tosFeature
4748
case trackingProtectionRefactor
4849
case zoomFeature
4950

@@ -125,6 +126,7 @@ struct NimbusFlaggableFeature: HasNimbusSearchBar {
125126
.toolbarRefactor,
126127
.toolbarOneTapNewTab,
127128
.toolbarNavigationHint,
129+
.tosFeature,
128130
.trackingProtectionRefactor,
129131
.zoomFeature:
130132
return nil

firefox-ios/Client/Nimbus/NimbusFeatureFlagLayer.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ final class NimbusFeatureFlagLayer {
106106
case .toolbarNavigationHint:
107107
return checkToolbarNavigationHintFeature(from: nimbus)
108108

109+
case .tosFeature:
110+
return checkTosFeature(from: nimbus)
111+
109112
case .trackingProtectionRefactor:
110113
return checkTrackingProtectionRefactor(from: nimbus)
111114

@@ -210,6 +213,11 @@ final class NimbusFeatureFlagLayer {
210213
return config.navigationHint
211214
}
212215

216+
private func checkTosFeature(from nimbus: FxNimbus) -> Bool {
217+
let config = nimbus.features.tosFeature.value()
218+
return config.status
219+
}
220+
213221
private func checkTrackingProtectionRefactor(from nimbus: FxNimbus) -> Bool {
214222
let config = nimbus.features.trackingProtectionRefactor.value()
215223
return config.enabled
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# The configuration for the tosFeature feature
2+
features:
3+
tos-feature:
4+
description: >
5+
This feature is for managing the roll out of the ToS (Term of Service) implementation
6+
variables:
7+
status:
8+
description: >
9+
Enables the feature
10+
type: Boolean
11+
default: false
12+
defaults:
13+
- channel: beta
14+
value:
15+
status: false
16+
- channel: developer
17+
value:
18+
status: false

firefox-ios/nimbus.fml.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ include:
4040
- nimbus-features/spotlightSearchFeature.yaml
4141
- nimbus-features/tabTrayFeature.yaml
4242
- nimbus-features/toolbarRefactorFeature.yaml
43+
- nimbus-features/tosFeature.yaml
4344
- nimbus-features/trackingProtectionRefactor.yaml
4445
- nimbus-features/zoomFeature.yaml

0 commit comments

Comments
 (0)