Upstream is doing a couple of IWYU fixes for `base::StringPrintf`, and
this will have an effect on our own uses of this function. This change
corrects all the includes we have.
This is a mechanical change, done with the following script.
```sh
remove_header_if_unused() {
files=$(git grep -l "base/strings/stringprintf.h")
for file in $files; do
if ! git grep -qE "base::StringPrintf|base::StringAppend" "$file"; then
sed -i '/base\/strings\/stringprintf.h/d' "$file"
echo "Removed 'base/strings/stringprintf.h' from $file"
fi
done
}
add_header_if_needed() {
files=$(git grep -lE "base::StringPrintf|base::StringAppend")
for file in $files; do
../tools/add_header.py --header '"base/strings/stringprintf.h"' "$file"
done
}
remove_header_if_unused
add_header_if_needed
```
* Remove unused and invalid namespaces from Windows ADMX
Fixesbrave/brave-browser#42956
* lint fixes
* more lint fixes
---------
Co-authored-by: Brian Clifton <brian@clifton.me>
fix https://github.com/brave/brave-browser/issues/46193
When rounded corners feature is disabled, contents separator should
be hidden when split view is opened.
TEST=SideBySideEnabledBrowserTest.BraveMultiContentsViewTest
fix https://github.com/brave/brave-browser/issues/46191
Uptream loads split view specific page when createing another tab.
We want to load NTP instead.
TEST=SplitViewLocationBarBrowserTest.URLShouldBeUpdated_WhenActiveTabChanges
1. launch browser with --enable-features=SideBySide
2. Select "Add tab to split view" from active tab's context menu
3. Check NTP is loaded in newly created tab
Fixes the following error by bumping up webui_resources.grd's includes.
--------------------------------------------------------
FAILED: gen/ui/webui/resources/resources_grit.d.stamp gen/ui/webui/resources/grit/webui_resources.h gen/ui/webui/resources/grit/webui_resources_map.cc gen/ui/webui/resources/grit/webui_resources_map.h gen/ui/webui/resources/webui_resources.pak gen/ui/webui/resources/webui_resources.pak.info
python3 ../../tools/grit/grit.py -i gen/ui/webui/resources/webui_resources.grd build -o gen/ui/webui/resources --depdir . --depfile gen/ui/webui/resources/resources_grit.d --write-only-new=1 --depend-on-stamp -D DEVTOOLS_GRD_PATH=gen/third_party/devtools-frontend/src/front_end/devtools_resources -D SHARED_INTERMEDIATE_DIR=gen -D _google_chrome=false -D _is_chrome_for_testing_branded=false -D chromeos_ash=false -D reven=false -D toolkit_views=true -D use_aura=false -D use_ozone=false -D use_titlecase=true -D is_desktop_android=false -D scale_factors=2x -E branding_path_component=brave -E root_gen_dir=gen -E root_src_dir=../../ -E CHROMIUM_BUILD=chromium -E add_filepath_to_resource_map=false -f gen/tools/gritsettings/default_resource_ids -p ../../tools/gritsettings/startup_resources_mac.txt --assert-file-list obj/ui/webui/resources/resources_expected_outputs.txt
Traceback (most recent call last):
File "/Users/jenkins/jenkins/workspace/brave-browser-build-macos-x64-nightly/src/out/Release/../../tools/grit/grit.py", line 17, in <module>
sys.exit(grit.grit_runner.Main(sys.argv[1:]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jenkins/jenkins/workspace/brave-browser-build-macos-x64-nightly/src/tools/grit/grit/grit_runner.py", line 313, in Main
return toolobject.Run(options, args[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jenkins/jenkins/workspace/brave-browser-build-macos-x64-nightly/src/tools/grit/grit/tool/build.py", line 271, in Run
self.Process()
File "/Users/jenkins/jenkins/workspace/brave-browser-build-macos-x64-nightly/src/tools/grit/grit/tool/build.py", line 387, in Process
self.res.InitializeIds()
File "/Users/jenkins/jenkins/workspace/brave-browser-build-macos-x64-nightly/src/tools/grit/grit/node/misc.py", line 682, in InitializeIds
self._id_map = _ComputeIds(self, predetermined_id_map)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jenkins/jenkins/workspace/brave-browser-build-macos-x64-nightly/src/tools/grit/grit/node/misc.py", line 250, in _ComputeIds
check_group_count()
File "/Users/jenkins/jenkins/workspace/brave-browser-build-macos-x64-nightly/src/tools/grit/grit/node/misc.py", line 140, in check_group_count
raise exception.IdRangeOverflow(msg)
grit.exception.IdRangeOverflow: ID range overflow.: Generated .grd file used more IDs (1132) than were allocated for it (1131) for type includes. You need to update ../../../../gen/tools/gritsettings/default_resource_ids for this .grd.
--------------------------------------------------------
This for some reason only started being an issue now, but basically we
have to make sure that an empty line is left at the end of
`package.json`, otherwise we get presubmit failures.
Resolves https://github.com/brave/brave-browser/issues/46229
This change corrects all crate patches, changing them to point to
`brave/`. This eliminates the need of patching `gnrt vendor` to address
this patch mismatch.
Patches should be created now with:
```sh
git format-patch \
--start-number=101 \
--src-prefix=a/brave/ \
--dst-prefix=b/brave/ \
--output-directory \
third_party/rust/chromium_crates_io/patches/some-crate/ \
HEAD^
```
Resolves https://github.com/brave/brave-browser/issues/46201
fixbrave/brave-browser#46161
TEST=SplitViewLocationBarBrowserTest.*
launch browser with --enable-features=SideBySide
Select Add tab to split view from tab's context menu
Check mini urlbar is displayed on the inactive tab's contents
This change ensures that the deprecated `WKPreferences.javaScriptEnabled` is correctly reset between navigations and also changes the flow so that this legacy preference is only set in iOS 17 as iOS 18 solves the original issue without setting this value.