-
Notifications
You must be signed in to change notification settings - Fork 443
Fix #1307: Upgrade adblock stats library to use adblock-rust. #1308
Fix #1307: Upgrade adblock stats library to use adblock-rust. #1308
Conversation
static let generalAdblockName = "latest" | ||
static func generalAdblockName(for fileType: FileType) -> String? { | ||
switch fileType { | ||
case .dat: return "rs-ABPFilterParserData" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some logic had to be added to handle differences between ios-json and universal-dat files, this includes different endpoints and file names
@@ -0,0 +1,96 @@ | |||
#ifndef ADBLOCK_RUST_FFI_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was generated, see https://github.com/brave/adblock-rust-ffi#regenerating-the-c-header
eb62981
to
64438df
Compare
This file will be now always downloaded from the server if not present on the device.
64438df
to
3b387a7
Compare
switch self { | ||
case .dat: return "https://adblock-data.s3.brave.com/4/" | ||
case .json: return "https://adblock-data.s3.brave.com/ios/" | ||
case .tgz: return "" // Httpse resources are not supported yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified this, but wanted to say that this does not impact HTTPSE stats, as we currently use a different system for this anyway.
case .vi: resourceId = "6A0209AC-9869-4FD6-A9DF-039B4200D52C" | ||
} | ||
|
||
switch fileType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creative solution to get around this 😄
lgtm |
For now there is no automation when it comes to updating this library, it needs to be done manually.
Submitter Checklist:
Fix #123: This fixes the shattered coffee cup!
(orNo Bug: <message>
if no relevant ticket)NSLocalizableString()
Test Plan:
Browse through popular websites and see if adblock stats are updating and the app is not crashing.
Play few youtube/twitch videos as well
Screenshots:
Reviewer Checklist:
QA/(Yes|No)
release-notes/(include|exclude)
bug
/enhancement