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

Remove check_includes = false for //brave/browser/extensions #25826

Merged
merged 1 commit into from
Oct 5, 2024

Conversation

bridiver
Copy link
Collaborator

@bridiver bridiver commented Oct 4, 2024

Resolves brave/brave-browser#10661
Resolves brave/brave-browser#41398

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • 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 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:

browser/extensions/BUILD.gn Show resolved Hide resolved
browser/tor/BUILD.gn Show resolved Hide resolved
@bridiver bridiver requested a review from a team as a code owner October 5, 2024 00:02
Copy link
Collaborator

@tmancey tmancey left a comment

Choose a reason for hiding this comment

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

ads LGTM

Copy link
Contributor

github-actions bot commented Oct 5, 2024

[puLL-Merge] - brave/brave-core@25826

Here's my review of the pull request:

Description

This PR makes significant changes to the Brave browser's codebase, primarily focusing on reorganizing and refactoring various components related to extensions, Tor, WebTorrent, and other Brave-specific features. The changes aim to improve code structure, reduce dependencies, and separate concerns.

Changes

Changes

  1. browser/autocomplete/brave_autocomplete_scheme_classifier.cc:

    • Replaced a function call with direct preference access for WebTorrent enabled status.
  2. browser/brave_adaptive_captcha/:

    • Added a new BUILD.gn file for the brave_adaptive_captcha component.
    • Removed sources.gni file and integrated its contents into the new BUILD.gn.
  3. browser/brave_ads/:

    • Updated various files to include necessary headers and adjust dependencies.
  4. browser/extensions/:

    • Significant refactoring of the extensions component:
      • Split out component_loader, brave_prefs_util_impl, and brave_rewards_api into separate source sets.
      • Removed unnecessary dependencies and headers.
      • Updated BUILD.gn to reflect these changes.
  5. browser/tor/:

    • Moved Tor-related files from sources.gni to a new BUILD.gn file.
    • Refactored TorProfileManager to use a separate BrowserListObserver.
    • Added new utility functions for Tor-related checks.
  6. browser/ui/BUILD.gn:

    • Updated dependencies and source files to reflect changes in other components.
  7. components/brave_webtorrent/:

    • Removed IsWebtorrentPrefEnabled function and updated related code.
  8. Various other files:

    • Updated include paths, dependencies, and build configurations throughout the project to align with the new structure.

Possible Issues

  1. The removal of IsWebtorrentPrefEnabled function might affect other parts of the code that were using it. Careful testing is needed to ensure this change doesn't break existing functionality.

  2. The extensive refactoring of the extensions component could potentially introduce subtle bugs or behavior changes. Thorough testing of all affected features is crucial.

  3. The changes to the Tor component, especially the refactoring of TorProfileManager, should be carefully reviewed to ensure that all Tor-related functionality remains intact.

Security Hotspots

No significant security issues were identified in this change. However, any changes to the Tor and WebTorrent components should be carefully reviewed to ensure they don't introduce any privacy or security vulnerabilities.

Overall, this PR appears to be a substantial refactoring effort aimed at improving code organization and reducing unnecessary dependencies. While the changes seem well-intentioned, thorough testing across all affected components is crucial to ensure no regressions or unintended side effects are introduced.

Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

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

Rewards ++

Some new targets with check_includes = false have been created to minimize the amount of code where gn check does not apply.
@bridiver bridiver force-pushed the fix-extensions-check-includes branch from 72a9249 to 7d393fc Compare October 5, 2024 20:50
@bridiver bridiver changed the title Fix extensions check includes Remove check_includes = false for //brave/browser/extensions Oct 5, 2024
@bridiver bridiver enabled auto-merge (squash) October 5, 2024 20:52
@bridiver
Copy link
Collaborator Author

bridiver commented Oct 5, 2024

There are no functional changes and this fixes an intermittent build error so I'm going to admin merge

@bridiver bridiver disabled auto-merge October 5, 2024 23:37
@bridiver bridiver merged commit 7254c72 into master Oct 5, 2024
19 checks passed
@bridiver bridiver deleted the fix-extensions-check-includes branch October 5, 2024 23:37
@github-actions github-actions bot added this to the 1.72.x - Nightly milestone Oct 5, 2024
@brave-builds
Copy link
Collaborator

Released in v1.72.64

Copy link
Member

@darkdh darkdh left a comment

Choose a reason for hiding this comment

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

++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants