8 Commits
Author SHA1 Message Date
Max Karolinskiy efa79dfdd1 Changes check_chromium_src warning into an error. (#33823)
* Changes check_chromium_src warning into an error.
Changes the warning that catches use of defined symbols in the override,
but not in the original file into an error. All uses of such symbols
should be marked with // CHROMIUM_SRC_INTERNAL_USE comment.

* Removes symbol exclusions section of the config file.
All symbols that don't conform to check_chromium_src rules should be marked with // CHROMIUM_SRC_NOLINT comment.
2026-02-18 16:07:35 -05:00
Aleksei Khoroshilov 6dafba18f8 Update chromium_src include logic to allow <> includes (#29652)
[chromium_src] Allow overrides to reference original files with #include <...>

This change updates the include path handling for brave/chromium_src overrides:
- Adds support for referencing original Chromium files using #include <...> in
overrides.
- Enables this by replacing -I../../brave/chromium_src with 
-iquote../../brave/chromium_src, so the path is only used for #include "..."
directives.

With this, other files in the build tree can reference brave/chromium_src
overrides using #include "...", while the overrides themselves can reference
original Chromium files using #include <...>. Since Chromium uses #include "..."
for all in-tree files, we can leverage this convention and eventually drop
support for #include "src/" by removing -I../../.. and making rbe_exec_root
modification obsolete.
2025-06-27 14:10:21 +07:00
cdesouza-chromium b55418f7a3 Deleting all base::ranges uses (#27446)
All range implementations are now deleted in chromium and the std
implementation is to be used in its place.

This is a mechanical change.

```bash
function add_header {
  echo "Adding header $1"
  git diff --name-only \
    | xargs ../tools/add_header.py --header "$1"
  git grep -l "std::ranges" \
    | xargs ../tools/add_header.py --header "$1"
}

function remove_header {
  echo "Removing header $1"
  git diff --name-only \
    | xargs ../tools/add_header.py --header "$1" --remove
  git grep -l "$1" \
    | xargs ../tools/add_header.py --header "$1" --remove
}
```

Chromium change:
https://chromium.googlesource.com/chromium/src/+/3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f

commit 3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f
Author: Peter Kasting <pkasting@chromium.org>
Date:   Wed Jan 29 14:20:16 2025 -0800

    Remove base/ranges/.

    Bug: 386918226

Resolves https://github.com/brave/brave-browser/issues/43664
2025-02-01 16:05:11 +00:00
Claudio DeSouza 23aabf0fe1 [cr133] base::make_span deleted
All uses of `base::make_span` can be just `span{}`.

Chromium change:
https://chromium-review.googlesource.com/c/chromium/src/+/6066402

commit b394ea77c33ed427269ad91712467c2da6e12e7e
Author: Peter Kasting <pkasting@chromium.org>
Date:   Tue Dec 3 23:04:42 2024 +0000

    Remove make_span.

    This is no longer used.

    Bug: 341907909
2025-01-27 09:41:08 -05:00
Aleksei Khoroshilov c726422513 Alias settings_client internals to see it in a memory dump. (#26654)
* Alias settings_client internals to see in a memory dump.

* Prevent few optimizations to keep the object on stack.

* Keep ExecutionContext type in the dump.
2024-11-22 08:17:17 +01:00
Emerick Rogul 82d277018b Remove pragma clang max_tokens_here overrides since experiment is now over
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/ed2126e6436a0f6bccca4f3cca9edb9f9a6587b2

commit ed2126e6436a0f6bccca4f3cca9edb9f9a6587b2
Author: Hans Wennborg <hans@chromium.org>
Date:   Tue Aug 2 14:44:58 2022 +0000

    Disable the -Wmax-tokens experiment

    It appears to be doing more harm than good at this point, and in the
    meantime we've gained better tools to analyze and track the include
    graph. Let's see how things develop with this turned off.

    Bug: 1348349, 1049569
2022-09-15 20:46:18 -04:00
Aleksey Khoroshilov 860f6ec6cb Replace relative paths in chromium_src to src-based.
# Conflicts:
#	chromium_src/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc
#	chromium_src/chrome/browser/ui/views/bubble/bubble_contents_wrapper.cc
#	chromium_src/chrome/browser/ui/views/page_info/page_info_bubble_view.cc
#	chromium_src/chrome/browser/ui/views/page_info/page_info_view_factory.h
#	chromium_src/chrome/common/webui_url_constants.cc
#	chromium_src/components/safe_browsing/content/browser/client_side_model_loader.cc
#	chromium_src/components/translate/core/browser/translate_prefs.cc
#	chromium_src/third_party/blink/renderer/core/loader/subresource_redirect_util.cc
#	chromium_src/third_party/blink/renderer/core/loader/subresource_redirect_util.h
2021-12-08 14:47:35 +07:00
Max Karolinskiy bfa1e1dca8 [iOS] Workaround for unknown pragma.
The version of clang included with Xcode (as high as XCode 11.4.1)
doesn't recognize #pragma clang max_tokens_here.

The pragma was added to clang here:
https://reviews.llvm.org/rG739b410f1ff51d507830774320c2db3a80d8610d

The Chromium change that started using it:

https://chromium.googlesource.com/chromium/src/+/b3e433a31194beb54e70acceba9401f47c74fc7d

commit b3e433a31194beb54e70acceba9401f47c74fc7d
Author: Hans Wennborg <hans@chromium.org>
Date:   Tue Apr 21 11:21:40 2020 +0000

    [base] Reduce the size of base/debug/alias.h significantly.

    This is a very widely included header, with
    ca 11,000 transitive includes for the 'chrome' target
    in Linux debug builds.

    Despite providing very basic functionality, its size
    was a whopping 480,000 tokens after pre-processing.
    This change brings the size down to 130 tokens on
    Linux.

    Bug: 242216
2020-07-01 18:12:05 -04:00