Rewrite vector<T*> into vector<raw_ptr<T, VectorExperimental>>
See chromium-dev announcement:
https://groups.google.com/a/chromium.org/g/chromium-dev/c/sKckMpzHQgY/m/M3SWxEg3AQAJ?utm_medium=email&utm_source=footer
Code review:
- First patch: Automatic rewrite
- Later patches: Manual fixes
The automatic rewrite used the script:
./tools/clang/rewrite_templated_container_fields/rewrite-multiple-platforms.sh
Binary size increase:
The increase is only 33% (+5kB) above the per-patch limit (+16kB). This
is not a lot given the size of the rewrite. Increase of around 500kb was
approved for MiraclePtr.
AX-Relnotes: n/a.
Binary-Size: See commit description.
Bug: 1432993
Change-Id: I8dfc4c2b274b724b99cf408f010da5c821edae9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5140028
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1239777}
diff --git a/components/search_engines/util.cc b/components/search_engines/util.cc
index ca68222..21d2a6b 100644
--- a/components/search_engines/util.cc
+++ b/components/search_engines/util.cc
@@ -434,7 +434,7 @@
DCHECK(template_urls);
// Remove items.
- for (const auto* removed_engine : actions.removed_engines) {
+ for (const TemplateURL* removed_engine : actions.removed_engines) {
auto j = FindTemplateURL(template_urls, removed_engine);
DCHECK(j != template_urls->end());
DCHECK(!default_search_provider ||