Swap ref_counted.h for scoped_refptr.h when appropriate in various dirs
At some point, scoped_refptr got split off into its own header. Use it
in various headers when appropriate in place of ref_counted.h.
Mostly automated with the following commands:
git ls-files chrome | grep '\.h$' | \
xargs grep -l base/memory/ref_counted.h | xargs grep -L RefCounted | \
xargs grep -L REQUIRE_ADOPTION_FOR_REFCOUNTED_TYPE | \
xargs grep -l 'scoped_refptr<' | \
xargs grep -L base/memory/scoped_refptr.h > list.txt
Then remove files from list.txt for directories to process in separate
CLs.
cat list.txt | \
xargs tools/add_header.py --header '"base/memory/scoped_refptr.h"'
cat list.txt | \
xargs tools/add_header.py --header '"base/memory/ref_counted.h"' \
--remove
Then do IWYU to fix the build.
Bug: 40245294
Change-Id: I8175d67249f79529149d19ee5aabd3c26bf6dd3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7081865
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1535395}
NOKEYCHECK=True
GitOrigin-RevId: 2fadc65f280651c4a7e59df7ad85ffddaad5097f
1 file changed