Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] - Fix #27841: Added API for use_legacy_component and callback to the AdblockService #16693

Closed
wants to merge 1 commit into from

Conversation

Brandon-T
Copy link
Contributor

Resolves brave/brave-browser#27841

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@Brandon-T Brandon-T added CI/skip-android Do not run CI builds for Android CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 QA/No labels Jan 16, 2023
@Brandon-T Brandon-T added this to the 1.49.x - Nightly milestone Jan 16, 2023
@Brandon-T Brandon-T requested a review from a team as a code owner January 16, 2023 19:06
@Brandon-T Brandon-T self-assigned this Jan 16, 2023
@Brandon-T Brandon-T requested a review from cuba January 16, 2023 19:06
@github-actions
Copy link
Contributor

⚠️ PR head is an unsigned commit
commit: 99c7ecad8ad9b3e09f4d762b7051ddb3dac8ae6e
reason: unsigned
Please follow the handbook to configure commit signing
cc: @Brandon-T

3 similar comments
@github-actions
Copy link
Contributor

⚠️ PR head is an unsigned commit
commit: 99c7ecad8ad9b3e09f4d762b7051ddb3dac8ae6e
reason: unsigned
Please follow the handbook to configure commit signing
cc: @Brandon-T

@github-actions
Copy link
Contributor

⚠️ PR head is an unsigned commit
commit: 99c7ecad8ad9b3e09f4d762b7051ddb3dac8ae6e
reason: unsigned
Please follow the handbook to configure commit signing
cc: @Brandon-T

@github-actions
Copy link
Contributor

⚠️ PR head is an unsigned commit
commit: 99c7ecad8ad9b3e09f4d762b7051ddb3dac8ae6e
reason: unsigned
Please follow the handbook to configure commit signing
cc: @Brandon-T

@Brandon-T Brandon-T force-pushed the feature/ios-component-updater-exports branch from 99c7eca to 8457b3a Compare January 16, 2023 20:42
@github-actions
Copy link
Contributor

⚠️ PR head is an unsigned commit
commit: 8457b3a
reason: unsigned
Please follow the handbook to configure commit signing
cc: @Brandon-T

@github-actions
Copy link
Contributor

⚠️ PR head is an unsigned commit
commit: 8457b3a
reason: unsigned
Please follow the handbook to configure commit signing
cc: @Brandon-T

Comment on lines +63 to +65
const char kAdBlockIosComponentName[] = "Brave Ad Block Updater";
const char kAdBlockIosComponentId[] = "iodkpdagapdfkphljnddpjlldadblomo";
const char kAdBlockIosComponentBase64PublicKey[] =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make it more obvious that this component isn't iOS specific?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either that or find a way to share the component defined in the ad_block_service.cc

Copy link
Contributor

@cuba cuba Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all temporary and can be removed once we switch to the non-legacy version
Edit: NVM, this component id is the new one that is not iOS specific

@github-actions
Copy link
Contributor

⚠️ PR head is an unsigned commit
commit: 8457b3a
reason: unsigned
Please follow the handbook to configure commit signing
cc: @Brandon-T

1 similar comment
@github-actions
Copy link
Contributor

⚠️ PR head is an unsigned commit
commit: 8457b3a
reason: unsigned
Please follow the handbook to configure commit signing
cc: @Brandon-T

@kylehickinson
Copy link
Collaborator

Based on this solution keeping the properties for install location & filter lists are we going to only call it once on brave-ios side? (cc @cuba)

@kjozwiak
Copy link
Member

kjozwiak commented Mar 2, 2023

Removed the 1.49.x milestone as this hasn't landed in master yet.

@cuba
Copy link
Contributor

cuba commented Apr 6, 2023

Based on this solution keeping the properties for install location & filter lists are we going to only call it once on brave-ios side? (cc @cuba)

If I understand you correctly, yes we will call it only once. Technically we already only attach the callback once so the code won't change much on the iOS side. As for the filter lists, those are only retrieved once but there shouldn't be any reason why we can't access it multiple times.

@@ -22,6 +22,7 @@ using OnComponentReadyCallback =

void RegisterAdBlockIosDefaultDatComponent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove Dat from this name as it will not be a dat format if use_legacy_component is false

@cuba
Copy link
Contributor

cuba commented Aug 3, 2023

@Brandon-T its been some time and I have forgotten what is missing to merge this.

@antonok-edm antonok-edm self-requested a review August 3, 2023 22:38
@cuba
Copy link
Contributor

cuba commented Sep 13, 2023

Since this PR is really out of date and things have changed a lot since its creation I have created a new PR here which uses newer components:
#20137

@cuba cuba closed this Sep 13, 2023
@Brandon-T Brandon-T deleted the feature/ios-component-updater-exports branch January 17, 2024 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-android Do not run CI builds for Android CI/skip-macos-x64 Do not run CI builds for macOS x64 QA/No
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[iOS] - Allow AdblockService to use legacy component updater
5 participants