(no title)
bsclifton | 2 years ago
What you'll notice more often is a folder we have called `chromium_src`. This directory mirrors the directory structure for Chromium under `src` and the build system will look for matches. If there's a file with the same name under `chromium_src`, it'll prefer that one. That file then does what it needs to differently and then includes the original file.
This approach helps keep things much more lightweight - but it has challenges too. If code fails to apply (file that `chromium_src` is matching gets renamed, etc) it can be hard to detect. This is where you'd want to have a test to catch that.
Another person shared - but here's a link to our patching documentation: https://github.com/brave/brave-browser/wiki/Patching-Chromiu...
You'll notice the actual patching itself is introduced with the caveat:
> When other options are exhausted, you can patch the code directly
freedomben|2 years ago