Skip to content

Commit 1d0a6fb

Browse files
authored
Refactor FXIOS-8554 - Adjusting Focus iOS to use the BrowserKit ContentBlockingGenerator (mozilla-mobile#19217)
* Use content blocking generator from browser kit * Missing file path change
1 parent 00bab9d commit 1d0a6fb

File tree

15 files changed

+45
-2878
lines changed

15 files changed

+45
-2878
lines changed

checkout.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
set -x
88
cd focus-ios
99

10+
# Version 107.0 hash
11+
SHAVAR_COMMIT_HASH="1d71be25893b05ba85850078b1ccedc0824ca958"
12+
1013
# Download the nimbus-fml.sh script from application-services.
1114
NIMBUS_FML_FILE=./nimbus.fml.yaml
1215
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/mozilla/application-services/main/components/nimbus/ios/scripts/bootstrap.sh | bash -s -- $NIMBUS_FML_FILE
1316

14-
git clone https://github.com/mozilla-services/shavar-prod-lists.git || exit 1
15-
16-
# Grab the las known (pinned) commit on the 93.0 branch
17-
(cd shavar-prod-lists && git checkout -q 352f772269f13e70893d0d112d26aed1f079ce6e)
17+
# Clone shavar prod list
18+
cd .. # Make sure we are at the root of the repo
19+
rm -rf shavar-prod-lists && git clone https://github.com/mozilla-services/shavar-prod-lists.git && git -C shavar-prod-lists checkout $SHAVAR_COMMIT_HASH
1820

19-
(cd content-blocker-lib-ios/ContentBlockerGen && swift run)
21+
(cd BrowserKit && swift run)

focus-ios/Blockzilla.xcodeproj/project.pbxproj

Lines changed: 30 additions & 38 deletions
Large diffs are not rendered by default.

focus-ios/Blockzilla/Lib/TrackingProtection/TrackingProtection.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ extension TrackingProtectionStatus: Equatable {
3232
}
3333

3434
enum BlocklistName: String {
35-
case advertising = "disconnect-advertising"
36-
case analytics = "disconnect-analytics"
37-
case content = "disconnect-content"
38-
case social = "disconnect-social"
35+
case advertising = "disconnect-block-advertising"
36+
case analytics = "disconnect-block-analytics"
37+
case content = "disconnect-block-content"
38+
case social = "disconnect-block-social"
3939

4040
var filename: String { return self.rawValue }
4141

focus-ios/Lists/disconnect-advertising.json

Lines changed: 0 additions & 1732 deletions
This file was deleted.

focus-ios/Lists/disconnect-analytics.json

Lines changed: 0 additions & 313 deletions
This file was deleted.

focus-ios/Lists/disconnect-content.json

Lines changed: 0 additions & 485 deletions
This file was deleted.

focus-ios/Lists/disconnect-social.json

Lines changed: 0 additions & 66 deletions
This file was deleted.

focus-ios/Lists/enabled-detector.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

focus-ios/Shared/Utils.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ class Utils {
1616
}
1717

1818
private static let lists: [SettingsToggle: String] = [
19-
.blockAds: "disconnect-advertising",
20-
.blockAnalytics: "disconnect-analytics",
21-
.blockSocial: "disconnect-social",
22-
.blockOther: "disconnect-content",
19+
.blockAds: "disconnect-block-advertising",
20+
.blockAnalytics: "disconnect-block-analytics",
21+
.blockSocial: "disconnect-block-social",
22+
.blockOther: "disconnect-block-content",
2323
.blockFonts: "web-fonts"
2424
]
2525

focus-ios/content-blocker-lib-ios/ContentBlockerGen/Package.swift

Lines changed: 0 additions & 26 deletions
This file was deleted.

focus-ios/content-blocker-lib-ios/ContentBlockerGen/Sources/ContentBlockerGen/main.swift

Lines changed: 0 additions & 47 deletions
This file was deleted.

focus-ios/content-blocker-lib-ios/ContentBlockerGen/Sources/ContentBlockerGenLib/ContentBlockerGenLib.swift

Lines changed: 0 additions & 96 deletions
This file was deleted.

focus-ios/content-blocker-lib-ios/ContentBlockerGen/Tests/ContentBlockerGenTests/ContentBlockerGenTests.swift

Lines changed: 0 additions & 49 deletions
This file was deleted.

focus-ios/content-blocker-lib-ios/ContentBlockerGen/Tests/ContentBlockerGenTests/XCTestManifests.swift

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)