diff --git a/025a94257380eadfad2d705129e5863fca0bf89e.patch b/025a94257380eadfad2d705129e5863fca0bf89e.patch deleted file mode 100644 index b1a9b35..0000000 --- a/025a94257380eadfad2d705129e5863fca0bf89e.patch +++ /dev/null @@ -1,2745 +0,0 @@ -From 025a94257380eadfad2d705129e5863fca0bf89e Mon Sep 17 00:00:00 2001 -From: Peter Kasting -Date: Wed, 29 Jan 2025 13:28:37 -0800 -Subject: [PATCH] Reland "[cleanup] Replace base::ranges with std::ranges: - base/" - -This reverts commit 982cfb705f41d5af228552a479ecdbfc465ee6c7. - -Reason for revert: Dependent code was fixed - -Original change's description: -> Revert "[cleanup] Replace base::ranges with std::ranges: base/" -> -> This reverts commit cbf3d6770d4f83fea7f21d0c2f55ea49e85dd69e. -> -> Reason for revert: Caused tree closure -> https://ci.chromium.org/ui/p/chromium/builders/ci/linux-cast-arm64-rel/15315/overview -> -> Original change's description: -> > [cleanup] Replace base::ranges with std::ranges: base/ -> > -> > Done entirely with `git grep` and `sed` + `git cl format`, no -> > hand-editing. -> > -> > Bug: 386918226 -> > Change-Id: I798034eefdcd34a4908cd4db10c0350cd76e8c5a -> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6202362 -> > Auto-Submit: Peter Kasting -> > Reviewed-by: Nico Weber -> > Owners-Override: Peter Kasting -> > Commit-Queue: Peter Kasting -> > Cr-Commit-Position: refs/heads/main@{#1413055} -> -> Bug: 386918226 -> Change-Id: Idf56be27425c9f45ec824cd8c7beb5fafad51c92 -> No-Presubmit: true -> No-Tree-Checks: true -> No-Try: true -> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6215373 -> Bot-Commit: Rubber Stamper -> Owners-Override: Salvador Guerrero Ramos -> Commit-Queue: Salvador Guerrero Ramos -> Cr-Commit-Position: refs/heads/main@{#1413064} - -Bug: 386918226 -Change-Id: I30bad5a61daff7d37a1d7e90ad27c12c3568d5cc -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6214753 -Auto-Submit: Peter Kasting -Owners-Override: Peter Kasting -Commit-Queue: Rubber Stamper -Bot-Commit: Rubber Stamper -Reviewed-by: Salvador Guerrero Ramos -Commit-Queue: Peter Kasting -Commit-Queue: Salvador Guerrero Ramos -Cr-Commit-Position: refs/heads/main@{#1413139} - -diff --git a/base/allocator/partition_alloc_support.cc b/base/allocator/partition_alloc_support.cc -index 138735d0f33e2..25b9ef35ce644 100644 ---- a/base/allocator/partition_alloc_support.cc -+++ b/base/allocator/partition_alloc_support.cc -@@ -4,6 +4,7 @@ - - #include "base/allocator/partition_alloc_support.h" - -+#include - #include - #include - #include -@@ -31,7 +32,6 @@ - #include "base/metrics/histogram_macros.h" - #include "base/no_destructor.h" - #include "base/pending_task.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_split.h" - #include "base/strings/stringprintf.h" - #include "base/system/sys_info.h" -@@ -465,7 +465,7 @@ std::string ExtractDanglingPtrSignature(std::string stacktrace) { - size_t caller_index = 0; - for (size_t i = 0; i < lines.size(); ++i) { - for (const auto& patterns : callee_patterns) { -- if (ranges::all_of(patterns, [&](std::string_view pattern) { -+ if (std::ranges::all_of(patterns, [&](std::string_view pattern) { - return lines[i].find(pattern) != std::string_view::npos; - })) { - caller_index = i + 1; -@@ -667,7 +667,7 @@ void CheckDanglingRawPtrBufferEmpty() { - std::vector> stack_traces = - internal::InstanceTracer::GetStackTracesForDanglingRefs(entry->id); - for (const auto& raw_stack_trace : stack_traces) { -- CHECK(ranges::is_partitioned(raw_stack_trace, is_frame_ptr_not_null)) -+ CHECK(std::ranges::is_partitioned(raw_stack_trace, is_frame_ptr_not_null)) - << "`raw_stack_trace` is expected to be partitioned: non-null values " - "at the begining followed by `nullptr`s."; - LOG(ERROR) << "Dangling reference from:\n"; -@@ -675,8 +675,8 @@ void CheckDanglingRawPtrBufferEmpty() { - // This call truncates the `nullptr` tail of the stack - // trace (see the `is_partitioned` CHECK above). - span(raw_stack_trace.begin(), -- ranges::partition_point(raw_stack_trace, -- is_frame_ptr_not_null))) -+ std::ranges::partition_point( -+ raw_stack_trace, is_frame_ptr_not_null))) - << "\n"; - } - #else -diff --git a/base/android/library_loader/library_prefetcher.cc b/base/android/library_loader/library_prefetcher.cc -index dad3336f4aab1..cf0a96a09b160 100644 ---- a/base/android/library_loader/library_prefetcher.cc -+++ b/base/android/library_loader/library_prefetcher.cc -@@ -15,6 +15,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -30,7 +31,6 @@ - #include "base/logging.h" - #include "base/posix/eintr_wrapper.h" - #include "base/process/process_metrics.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util.h" - #include "base/strings/stringprintf.h" - #include "build/build_config.h" -@@ -296,7 +296,7 @@ int NativeLibraryPrefetcher::PercentageOfResidentCode(size_t start, - } - total_pages += residency.size(); - resident_pages += static_cast( -- ranges::count_if(residency, [](unsigned char x) { return x & 1; })); -+ std::ranges::count_if(residency, [](unsigned char x) { return x & 1; })); - if (total_pages == 0) { - return -1; - } -diff --git a/base/apple/foundation_util.mm b/base/apple/foundation_util.mm -index fa3ff7f0332ee..5c9a38363548d 100644 ---- a/base/apple/foundation_util.mm -+++ b/base/apple/foundation_util.mm -@@ -10,6 +10,7 @@ - #include - #include - -+#include - #include - - #include "base/apple/bridging.h" -@@ -22,7 +23,6 @@ - #include "base/logging.h" - #include "base/numerics/checked_math.h" - #include "base/numerics/safe_conversions.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util.h" - #include "base/strings/sys_string_conversions.h" - #include "build/branding_buildflags.h" -@@ -234,7 +234,7 @@ FilePath GetInnermostAppBundlePath(const FilePath& exec_name) { - return FilePath(); - } - -- auto app = ranges::find_if( -+ auto app = std::ranges::find_if( - Reversed(components), [](const std::string& component) -> bool { - return component.size() > kExtLength && EndsWith(component, kExt); - }); -diff --git a/base/base64url_unittest.cc b/base/base64url_unittest.cc -index e8a2418a33818..c2e7bc9332892 100644 ---- a/base/base64url_unittest.cc -+++ b/base/base64url_unittest.cc -@@ -4,9 +4,9 @@ - - #include "base/base64url.h" - -+#include - #include - --#include "base/ranges/algorithm.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" - -@@ -159,7 +159,7 @@ TEST(Base64UrlTest, DecodeIntoVector) { - static constexpr uint8_t kExpected[] = {'1', '2', '3', '4'}; - std::optional> result = - Base64UrlDecode("MTIzNA", Base64UrlDecodePolicy::DISALLOW_PADDING); -- ASSERT_TRUE(ranges::equal(*result, kExpected)); -+ ASSERT_TRUE(std::ranges::equal(*result, kExpected)); - } - - TEST(Base64UrlTest, DecodeDisallowPaddingPolicy) { -diff --git a/base/callback_list.h b/base/callback_list.h -index cc3d8845da3aa..b1204f08a5568 100644 ---- a/base/callback_list.h -+++ b/base/callback_list.h -@@ -5,6 +5,7 @@ - #ifndef BASE_CALLBACK_LIST_H_ - #define BASE_CALLBACK_LIST_H_ - -+#include - #include - #include - #include -@@ -15,7 +16,6 @@ - #include "base/functional/bind.h" - #include "base/functional/callback.h" - #include "base/memory/weak_ptr.h" --#include "base/ranges/algorithm.h" - #include "base/types/is_instantiation.h" - - // OVERVIEW: -@@ -174,7 +174,7 @@ class CallbackListBase { - // Returns whether the list of registered callbacks is empty (from an external - // perspective -- meaning no remaining callbacks are live). - bool empty() const { -- return ranges::all_of( -+ return std::ranges::all_of( - callbacks_, [](const auto& callback) { return callback.is_null(); }); - } - -diff --git a/base/command_line.cc b/base/command_line.cc -index 53eacfac3c6eb..a35ddac7efebb 100644 ---- a/base/command_line.cc -+++ b/base/command_line.cc -@@ -9,6 +9,7 @@ - - #include "base/command_line.h" - -+#include - #include - #include - #include -@@ -21,7 +22,6 @@ - #include "base/logging.h" - #include "base/notreached.h" - #include "base/numerics/checked_math.h" --#include "base/ranges/algorithm.h" - #include "base/strings/strcat.h" - #include "base/strings/string_split.h" - #include "base/strings/string_tokenizer.h" -@@ -494,7 +494,7 @@ CommandLine::StringVector CommandLine::GetArgs() const { - // Gather all arguments after the last switch (may include kSwitchTerminator). - StringVector args(argv_.begin() + begin_args_, argv_.end()); - // Erase only the first kSwitchTerminator (maybe "--" is a legitimate page?) -- auto switch_terminator = ranges::find(args, kSwitchTerminator); -+ auto switch_terminator = std::ranges::find(args, kSwitchTerminator); - if (switch_terminator != args.end()) { - args.erase(switch_terminator); - } -diff --git a/base/command_line_fuzzer.cc b/base/command_line_fuzzer.cc -index 4d6f95a7acdaf..531f28b7a87fd 100644 ---- a/base/command_line_fuzzer.cc -+++ b/base/command_line_fuzzer.cc -@@ -13,7 +13,6 @@ - - #include "base/check.h" - #include "base/files/file_path.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util.h" - #include "base/strings/utf_string_conversions.h" - #include "build/build_config.h" -@@ -52,7 +51,8 @@ bool IsForbiddenSwitchCharacter(char c) { - bool IsValidSwitchName(const std::string& text) { - // This duplicates the logic in command_line.cc, but it's not exposed in form - // of public interface. -- return !text.empty() && !ranges::any_of(text, IsForbiddenSwitchCharacter) && -+ return !text.empty() && -+ !std::ranges::any_of(text, IsForbiddenSwitchCharacter) && - !StartsWith(text, "-") && !StartsWith(text, "/"); - } - -diff --git a/base/containers/checked_iterators_unittest.cc b/base/containers/checked_iterators_unittest.cc -index 0840182804464..a8905e80b2846 100644 ---- a/base/containers/checked_iterators_unittest.cc -+++ b/base/containers/checked_iterators_unittest.cc -@@ -9,7 +9,6 @@ - - #include "base/check_op.h" - #include "base/debug/alias.h" --#include "base/ranges/algorithm.h" - #include "base/test/gtest_util.h" - #include "build/build_config.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -215,7 +214,7 @@ TEST(CheckedContiguousIterator, OptimizedCopy) { - Iter out_end = std::copy(in_begin, in_end, out_begin); - EXPECT_EQ(out_end, out_begin + (in_end - in_begin)); - -- EXPECT_TRUE(ranges::equal(arr_in, arr_out)); -+ EXPECT_TRUE(std::ranges::equal(arr_in, arr_out)); - } - #endif // defined(_LIBCPP_VERSION) - -diff --git a/base/containers/circular_deque.h b/base/containers/circular_deque.h -index 0ed27b7fffb4b..db427316ff85c 100644 ---- a/base/containers/circular_deque.h -+++ b/base/containers/circular_deque.h -@@ -17,7 +17,6 @@ - #include "base/memory/raw_ptr_exclusion.h" - #include "base/numerics/checked_math.h" - #include "base/numerics/safe_conversions.h" --#include "base/ranges/algorithm.h" - #include "base/ranges/from_range.h" - - #if DCHECK_IS_ON() -diff --git a/base/containers/contains.h b/base/containers/contains.h -index d263b30c7bedb..e9c34d01e2c48 100644 ---- a/base/containers/contains.h -+++ b/base/containers/contains.h -@@ -5,13 +5,12 @@ - #ifndef BASE_CONTAINERS_CONTAINS_H_ - #define BASE_CONTAINERS_CONTAINS_H_ - -+#include - #include - #include - #include -- --#include "base/ranges/algorithm.h" - // TODO(dcheng): Remove this after fixing any IWYU errors. --#include "base/ranges/ranges.h" -+#include - - namespace base { - -@@ -43,7 +42,7 @@ constexpr bool Contains(const Container& container, const Value& value) { - "Error: About to perform linear search on an associative container. " - "Either use a more generic comparator (e.g. std::less<>) or, if a " - "linear search is desired, provide an explicit projection parameter."); -- return ranges::find(container, value) != std::ranges::end(container); -+ return std::ranges::find(container, value) != std::ranges::end(container); - } - } - -@@ -54,7 +53,7 @@ template - constexpr bool Contains(const Container& container, - const Value& value, - Proj proj) { -- return ranges::find(container, value, std::move(proj)) != -+ return std::ranges::find(container, value, std::move(proj)) != - std::ranges::end(container); - } - -diff --git a/base/containers/contains_nocompile.nc b/base/containers/contains_nocompile.nc -index 2ff0575beb1c7..4a95c93286dc5 100644 ---- a/base/containers/contains_nocompile.nc -+++ b/base/containers/contains_nocompile.nc -@@ -17,7 +17,7 @@ namespace base { - // likely unexpected and not intended. This is because the expression - // `set.find(kFoo)` is ill-formed, since there is no implimit conversion from - // std::string_view to `std::string`. This means Contains would fall back to the --// general purpose `base::ranges::find(set, kFoo)` linear search. -+// general purpose `std::ranges::find(set, kFoo)` linear search. - // To fix this clients can either use a more generic comparator like std::less<> - // (in this case `set.find()` accepts any type that is comparable to a - // std::string), or pass an explicit projection parameter to Contains, at which -diff --git a/base/containers/fixed_flat_map_unittest.cc b/base/containers/fixed_flat_map_unittest.cc -index e5016a2d6cf1d..845742a4a094f 100644 ---- a/base/containers/fixed_flat_map_unittest.cc -+++ b/base/containers/fixed_flat_map_unittest.cc -@@ -4,10 +4,10 @@ - - #include "base/containers/fixed_flat_map.h" - -+#include - #include - #include - --#include "base/ranges/algorithm.h" - #include "base/test/gtest_util.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -37,8 +37,8 @@ bool operator>=(const Unsortable& lhs, const Unsortable& rhs) = delete; - TEST(FixedFlatMapTest, MakeFixedFlatMap_SortedInput) { - constexpr auto kSquares = - MakeFixedFlatMap({{1, 1}, {2, 4}, {3, 9}, {4, 16}}); -- static_assert(ranges::is_sorted(kSquares), "Error: Map is not sorted."); -- static_assert(ranges::adjacent_find(kSquares) == kSquares.end(), -+ static_assert(std::ranges::is_sorted(kSquares), "Error: Map is not sorted."); -+ static_assert(std::ranges::adjacent_find(kSquares) == kSquares.end(), - "Error: Map contains repeated elements."); - EXPECT_THAT(kSquares, - ElementsAre(Pair(1, 1), Pair(2, 4), Pair(3, 9), Pair(4, 16))); -@@ -47,8 +47,8 @@ TEST(FixedFlatMapTest, MakeFixedFlatMap_SortedInput) { - TEST(FixedFlatMapTest, MakeFixedFlatMap_UnsortedInput) { - constexpr auto kMap = MakeFixedFlatMap( - {{"foo", 1}, {"bar", 2}, {"baz", 3}}); -- static_assert(ranges::is_sorted(kMap), "Error: Map is not sorted."); -- static_assert(ranges::adjacent_find(kMap) == kMap.end(), -+ static_assert(std::ranges::is_sorted(kMap), "Error: Map is not sorted."); -+ static_assert(std::ranges::adjacent_find(kMap) == kMap.end(), - "Error: Map contains repeated elements."); - EXPECT_THAT(kMap, - ElementsAre(Pair("bar", 2), Pair("baz", 3), Pair("foo", 1))); -diff --git a/base/containers/fixed_flat_set_unittest.cc b/base/containers/fixed_flat_set_unittest.cc -index 6fc4e062a3de9..b5b3b345100f9 100644 ---- a/base/containers/fixed_flat_set_unittest.cc -+++ b/base/containers/fixed_flat_set_unittest.cc -@@ -4,9 +4,9 @@ - - #include "base/containers/fixed_flat_set.h" - -+#include - #include - --#include "base/ranges/algorithm.h" - #include "base/test/gtest_util.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -15,8 +15,8 @@ namespace base { - - TEST(FixedFlatSetTest, MakeFixedFlatSet_SortedInput) { - constexpr auto kSet = MakeFixedFlatSet({1, 2, 3, 4}); -- static_assert(ranges::is_sorted(kSet), "Error: Set is not sorted."); -- static_assert(ranges::adjacent_find(kSet) == kSet.end(), -+ static_assert(std::ranges::is_sorted(kSet), "Error: Set is not sorted."); -+ static_assert(std::ranges::adjacent_find(kSet) == kSet.end(), - "Error: Set contains repeated elements."); - EXPECT_THAT(kSet, ::testing::ElementsAre(1, 2, 3, 4)); - } -@@ -24,8 +24,8 @@ TEST(FixedFlatSetTest, MakeFixedFlatSet_SortedInput) { - TEST(FixedFlatSetTest, MakeFixedFlatSet_UnsortedInput) { - constexpr auto kSet = - MakeFixedFlatSet({"foo", "bar", "baz"}); -- static_assert(ranges::is_sorted(kSet), "Error: Set is not sorted."); -- static_assert(ranges::adjacent_find(kSet) == kSet.end(), -+ static_assert(std::ranges::is_sorted(kSet), "Error: Set is not sorted."); -+ static_assert(std::ranges::adjacent_find(kSet) == kSet.end(), - "Error: Set contains repeated elements."); - EXPECT_THAT(kSet, ::testing::ElementsAre("bar", "baz", "foo")); - } -diff --git a/base/containers/flat_map.h b/base/containers/flat_map.h -index 8b0600ee7b846..25158d4eb9abf 100644 ---- a/base/containers/flat_map.h -+++ b/base/containers/flat_map.h -@@ -380,8 +380,8 @@ constexpr flat_map MakeFlatMap( - const Projection& proj = Projection()) { - Container elements; - internal::ReserveIfSupported(elements, unprojected_elements); -- base::ranges::transform(unprojected_elements, std::back_inserter(elements), -- proj); -+ std::ranges::transform(unprojected_elements, std::back_inserter(elements), -+ proj); - return flat_map(std::move(elements), - comp); - } -diff --git a/base/containers/flat_map_unittest.cc b/base/containers/flat_map_unittest.cc -index 6a9349963c2a2..cd13e77af11ef 100644 ---- a/base/containers/flat_map_unittest.cc -+++ b/base/containers/flat_map_unittest.cc -@@ -4,13 +4,13 @@ - - #include "base/containers/flat_map.h" - -+#include - #include - #include - #include - #include - #include - --#include "base/ranges/algorithm.h" - #include "base/test/move_only_int.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -282,7 +282,7 @@ TEST(FlatMap, InsertOrAssignMoveOnlyKey) { - base::flat_map map; - for (int i : {3, 1, 5, 6, 8, 7, 0, 9, 4, 2}) { - map.insert_or_assign(MoveOnlyInt(i), i); -- EXPECT_TRUE(ranges::is_sorted(map)); -+ EXPECT_TRUE(std::ranges::is_sorted(map)); - } - } - -@@ -317,7 +317,7 @@ TEST(FlatMap, InsertOrAssignMoveOnlyKeyWithHint) { - base::flat_map map; - for (int i : {3, 1, 5, 6, 8, 7, 0, 9, 4, 2}) { - map.insert_or_assign(map.end(), MoveOnlyInt(i), i); -- EXPECT_TRUE(ranges::is_sorted(map)); -+ EXPECT_TRUE(std::ranges::is_sorted(map)); - } - } - -@@ -362,7 +362,7 @@ TEST(FlatMap, TryEmplaceMoveOnlyKey) { - base::flat_map map; - for (int i : {3, 1, 5, 6, 8, 7, 0, 9, 4, 2}) { - map.try_emplace(MoveOnlyInt(i), i); -- EXPECT_TRUE(ranges::is_sorted(map)); -+ EXPECT_TRUE(std::ranges::is_sorted(map)); - } - } - -@@ -408,7 +408,7 @@ TEST(FlatMap, TryEmplaceMoveOnlyKeyWithHint) { - base::flat_map map; - for (int i : {3, 1, 5, 6, 8, 7, 0, 9, 4, 2}) { - map.try_emplace(map.end(), MoveOnlyInt(i), i); -- EXPECT_TRUE(ranges::is_sorted(map)); -+ EXPECT_TRUE(std::ranges::is_sorted(map)); - } - } - -diff --git a/base/containers/flat_set.h b/base/containers/flat_set.h -index b418941bc5166..5cd3a82b794d4 100644 ---- a/base/containers/flat_set.h -+++ b/base/containers/flat_set.h -@@ -5,11 +5,11 @@ - #ifndef BASE_CONTAINERS_FLAT_SET_H_ - #define BASE_CONTAINERS_FLAT_SET_H_ - -+#include - #include - #include - - #include "base/containers/flat_tree.h" --#include "base/ranges/algorithm.h" - - namespace base { - -@@ -174,8 +174,8 @@ constexpr flat_set MakeFlatSet( - const Projection& proj = Projection()) { - Container elements; - internal::ReserveIfSupported(elements, unprojected_elements); -- base::ranges::transform(unprojected_elements, std::back_inserter(elements), -- proj); -+ std::ranges::transform(unprojected_elements, std::back_inserter(elements), -+ proj); - return flat_set(std::move(elements), comp); - } - -diff --git a/base/containers/flat_tree.h b/base/containers/flat_tree.h -index 6558d75d4bd7d..937ed6b26b686 100644 ---- a/base/containers/flat_tree.h -+++ b/base/containers/flat_tree.h -@@ -20,7 +20,6 @@ - #include "base/compiler_specific.h" - #include "base/containers/span.h" - #include "base/memory/raw_ptr_exclusion.h" --#include "base/ranges/algorithm.h" - - namespace base { - -@@ -41,7 +40,7 @@ constexpr bool is_sorted_and_unique(const Range& range, Comp comp) { - // Being unique implies that there are no adjacent elements that - // compare equal. So this checks that each element is strictly less - // than the element after it. -- return ranges::adjacent_find(range, std::not_fn(comp)) == -+ return std::ranges::adjacent_find(range, std::not_fn(comp)) == - std::ranges::end(range); - } - -@@ -1029,7 +1028,7 @@ template - auto flat_tree::lower_bound( - const Key& key) const -> const_iterator { - KeyValueCompare comp(comp_); -- return ranges::lower_bound(*this, key, comp); -+ return std::ranges::lower_bound(*this, key, comp); - } - - template -@@ -1050,7 +1049,7 @@ auto flat_tree::lower_bound( - const KeyTypeOrK& key_ref = key; - - KeyValueCompare comp(comp_); -- return ranges::lower_bound(*this, key_ref, comp); -+ return std::ranges::lower_bound(*this, key_ref, comp); - } - - template -@@ -1063,7 +1062,7 @@ template - auto flat_tree::upper_bound( - const Key& key) const -> const_iterator { - KeyValueCompare comp(comp_); -- return ranges::upper_bound(*this, key, comp); -+ return std::ranges::upper_bound(*this, key, comp); - } - - template -@@ -1084,7 +1083,7 @@ auto flat_tree::upper_bound( - const KeyTypeOrK& key_ref = key; - - KeyValueCompare comp(comp_); -- return ranges::upper_bound(*this, key_ref, comp); -+ return std::ranges::upper_bound(*this, key_ref, comp); - } - - // ---------------------------------------------------------------------------- -diff --git a/base/containers/flat_tree_unittest.cc b/base/containers/flat_tree_unittest.cc -index a0c2efe850534..5bd62bc96d616 100644 ---- a/base/containers/flat_tree_unittest.cc -+++ b/base/containers/flat_tree_unittest.cc -@@ -33,6 +33,7 @@ - // * No tests with min_allocator and no tests counting allocations. - // Flat sets currently don't support allocators. - -+#include - #include - #include - #include -@@ -41,7 +42,6 @@ - #include - #include - --#include "base/ranges/algorithm.h" - #include "base/test/gtest_util.h" - #include "base/test/move_only_int.h" - #include "testing/gmock/include/gmock/gmock.h" -@@ -240,8 +240,8 @@ TEST(FlatTree, Stability) { - Tree cont({{0, 0}, {1, 0}, {0, 1}, {2, 0}, {0, 2}, {1, 1}}); - - auto AllOfSecondsAreZero = [&cont] { -- return ranges::all_of(cont, -- [](const Pair& elem) { return elem.second == 0; }); -+ return std::ranges::all_of( -+ cont, [](const Pair& elem) { return elem.second == 0; }); - }; - - EXPECT_TRUE(AllOfSecondsAreZero()) << "constructor should be stable"; -@@ -1146,10 +1146,10 @@ TYPED_TEST_P(FlatTreeTest, EraseEndDeath) { - TEST(FlatTree, KeyComp) { - ReversedTree cont({1, 2, 3, 4, 5}); - -- EXPECT_TRUE(ranges::is_sorted(cont, cont.key_comp())); -+ EXPECT_TRUE(std::ranges::is_sorted(cont, cont.key_comp())); - int new_elements[] = {6, 7, 8, 9, 10}; -- ranges::copy(new_elements, std::inserter(cont, cont.end())); -- EXPECT_TRUE(ranges::is_sorted(cont, cont.key_comp())); -+ std::ranges::copy(new_elements, std::inserter(cont, cont.end())); -+ EXPECT_TRUE(std::ranges::is_sorted(cont, cont.key_comp())); - } - - // value_compare value_comp() const -@@ -1157,10 +1157,10 @@ TEST(FlatTree, KeyComp) { - TEST(FlatTree, ValueComp) { - ReversedTree cont({1, 2, 3, 4, 5}); - -- EXPECT_TRUE(ranges::is_sorted(cont, cont.value_comp())); -+ EXPECT_TRUE(std::ranges::is_sorted(cont, cont.value_comp())); - int new_elements[] = {6, 7, 8, 9, 10}; -- ranges::copy(new_elements, std::inserter(cont, cont.end())); -- EXPECT_TRUE(ranges::is_sorted(cont, cont.value_comp())); -+ std::ranges::copy(new_elements, std::inserter(cont, cont.end())); -+ EXPECT_TRUE(std::ranges::is_sorted(cont, cont.value_comp())); - } - - // ---------------------------------------------------------------------------- -diff --git a/base/containers/intrusive_heap.h b/base/containers/intrusive_heap.h -index 2ef60175b7996..3eef33b334fbe 100644 ---- a/base/containers/intrusive_heap.h -+++ b/base/containers/intrusive_heap.h -@@ -144,7 +144,6 @@ - #include "base/check_op.h" - #include "base/compiler_specific.h" - #include "base/memory/ptr_util.h" --#include "base/ranges/algorithm.h" - #include "base/ranges/from_range.h" - #include "third_party/abseil-cpp/absl/container/inlined_vector.h" - -@@ -479,7 +478,7 @@ class IntrusiveHeap { - } - - // Repair the heap and ensure handles are pointing to the right index. -- ranges::make_heap(impl_.heap_, value_comp()); -+ std::ranges::make_heap(impl_.heap_, value_comp()); - for (size_t i = 0; i < size(); ++i) { - SetHeapHandle(i); - } -diff --git a/base/containers/span_unittest.cc b/base/containers/span_unittest.cc -index fc9efc4b9bbc6..eef1f20057946 100644 ---- a/base/containers/span_unittest.cc -+++ b/base/containers/span_unittest.cc -@@ -24,7 +24,6 @@ - #include "base/debug/alias.h" - #include "base/memory/raw_span.h" - #include "base/numerics/byte_conversions.h" --#include "base/ranges/algorithm.h" - #include "base/strings/cstring_view.h" - #include "base/strings/utf_ostream_operators.h" - #include "base/test/gtest_util.h" -@@ -1654,7 +1653,7 @@ TEST(SpanTest, ConstexprIterator) { - static constexpr int kArray[] = {1, 6, 1, 8, 0}; - constexpr span span(kArray); - -- static_assert(ranges::equal(kArray, span)); -+ static_assert(std::ranges::equal(kArray, span)); - static_assert(1 == span.begin()[0]); - static_assert(1 == *(span.begin() += 0)); - static_assert(6 == *(span.begin() += 1)); -@@ -1670,7 +1669,7 @@ TEST(SpanTest, ReverseIterator) { - static constexpr int kArray[] = {1, 6, 1, 8, 0}; - constexpr span span(kArray); - -- EXPECT_TRUE(ranges::equal(Reversed(kArray), Reversed(span))); -+ EXPECT_TRUE(std::ranges::equal(Reversed(kArray), Reversed(span))); - } - - TEST(SpanTest, AsBytes) { -@@ -2114,7 +2113,7 @@ TEST(SpanTest, Sort) { - int array[] = {5, 4, 3, 2, 1}; - - span dynamic_span = array; -- ranges::sort(dynamic_span); -+ std::ranges::sort(dynamic_span); - EXPECT_THAT(array, ElementsAre(1, 2, 3, 4, 5)); - std::sort(dynamic_span.rbegin(), dynamic_span.rend()); - EXPECT_THAT(array, ElementsAre(5, 4, 3, 2, 1)); -@@ -2122,7 +2121,7 @@ TEST(SpanTest, Sort) { - span static_span = array; - std::sort(static_span.rbegin(), static_span.rend(), std::greater<>()); - EXPECT_THAT(array, ElementsAre(1, 2, 3, 4, 5)); -- ranges::sort(static_span, std::greater<>()); -+ std::ranges::sort(static_span, std::greater<>()); - EXPECT_THAT(array, ElementsAre(5, 4, 3, 2, 1)); - } - -diff --git a/base/containers/to_value_list.h b/base/containers/to_value_list.h -index 65dcc44c681d2..643ccd015bfe8 100644 ---- a/base/containers/to_value_list.h -+++ b/base/containers/to_value_list.h -@@ -5,6 +5,7 @@ - #ifndef BASE_CONTAINERS_TO_VALUE_LIST_H_ - #define BASE_CONTAINERS_TO_VALUE_LIST_H_ - -+#include - #include - #include - #include -@@ -12,8 +13,6 @@ - #include - #include - --#include "base/ranges/algorithm.h" --#include "base/ranges/ranges.h" - #include "base/values.h" - - namespace base { -@@ -29,12 +28,13 @@ concept AppendableToValueList = - // Complexity: Exactly `size(range)` applications of `proj`. - template - requires std::ranges::sized_range && std::ranges::input_range && -- std::indirectly_unary_invocable> && -+ std::indirectly_unary_invocable> && - internal::AppendableToValueList< -- std::indirect_result_t>> -+ std::indirect_result_t>> - Value::List ToValueList(Range&& range, Proj proj = {}) { - auto container = Value::List::with_capacity(std::ranges::size(range)); -- ranges::for_each( -+ std::ranges::for_each( - std::forward(range), - [&](T&& value) { container.Append(std::forward(value)); }, - std::move(proj)); -diff --git a/base/containers/to_vector.h b/base/containers/to_vector.h -index 42b0918b96496..4748c7bdaf40e 100644 ---- a/base/containers/to_vector.h -+++ b/base/containers/to_vector.h -@@ -5,6 +5,7 @@ - #ifndef BASE_CONTAINERS_TO_VECTOR_H_ - #define BASE_CONTAINERS_TO_VECTOR_H_ - -+#include - #include - #include - #include -@@ -12,9 +13,6 @@ - #include - #include - --#include "base/ranges/algorithm.h" --#include "base/ranges/ranges.h" -- - namespace base { - - // Maps a container to a std::vector<> with respect to the provided projection. -@@ -28,14 +26,14 @@ namespace base { - // Complexity: Exactly `size(range)` applications of `proj`. - template - requires std::ranges::sized_range && std::ranges::input_range && -- std::indirectly_unary_invocable> -+ std::indirectly_unary_invocable> - auto ToVector(Range&& range, Proj proj = {}) { - using ProjectedType = -- std::projected, Proj>::value_type; -+ std::projected, Proj>::value_type; - std::vector container; - container.reserve(std::ranges::size(range)); -- ranges::transform(std::forward(range), std::back_inserter(container), -- std::move(proj)); -+ std::ranges::transform(std::forward(range), -+ std::back_inserter(container), std::move(proj)); - return container; - } - -diff --git a/base/containers/to_vector_unittest.cc b/base/containers/to_vector_unittest.cc -index 96423f954d5e1..a9fb719a8d713 100644 ---- a/base/containers/to_vector_unittest.cc -+++ b/base/containers/to_vector_unittest.cc -@@ -4,11 +4,11 @@ - - #include "base/containers/to_vector.h" - -+#include - #include - - #include "base/containers/adapters.h" - #include "base/containers/flat_set.h" --#include "base/ranges/ranges.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" - -diff --git a/base/containers/unique_ptr_adapters.h b/base/containers/unique_ptr_adapters.h -index 6c6d1fa651af7..c960f7a4d6c72 100644 ---- a/base/containers/unique_ptr_adapters.h -+++ b/base/containers/unique_ptr_adapters.h -@@ -64,7 +64,7 @@ struct UniquePtrComparator { - // Example usage: - // std::vector> vector; - // Foo* element = ... --// auto iter = base::ranges::find_if(vector, MatchesUniquePtr(element)); -+// auto iter = std::ranges::find_if(vector, MatchesUniquePtr(element)); - // - // Example of erasing from container: - // EraseIf(v, MatchesUniquePtr(element)); -diff --git a/base/containers/unique_ptr_adapters_unittest.cc b/base/containers/unique_ptr_adapters_unittest.cc -index f8dfc050f0d55..3ede4e5ed0844 100644 ---- a/base/containers/unique_ptr_adapters_unittest.cc -+++ b/base/containers/unique_ptr_adapters_unittest.cc -@@ -4,11 +4,11 @@ - - #include "base/containers/unique_ptr_adapters.h" - -+#include - #include - #include - - #include "base/memory/raw_ptr.h" --#include "base/ranges/algorithm.h" - #include "testing/gtest/include/gtest/gtest.h" - - namespace base { -@@ -110,39 +110,44 @@ TEST(UniquePtrMatcherTest, Basic) { - raw_ptr dangling_foo3 = foo3; - - { -- auto iter = ranges::find_if(v, UniquePtrMatcher(foo1)); -+ auto iter = std::ranges::find_if(v, UniquePtrMatcher(foo1)); - ASSERT_TRUE(iter != v.end()); - EXPECT_EQ(foo1, iter->get()); -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher(raw_foo1)) == iter); -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher(dangling_foo1)) == -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher(raw_foo1)) == -+ iter); -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher(dangling_foo1)) == - iter); - } - - { -- auto iter = ranges::find_if(v, UniquePtrMatcher(foo2)); -+ auto iter = std::ranges::find_if(v, UniquePtrMatcher(foo2)); - ASSERT_TRUE(iter != v.end()); - EXPECT_EQ(foo2, iter->get()); -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher(raw_foo2)) == iter); -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher(dangling_foo2)) == -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher(raw_foo2)) == -+ iter); -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher(dangling_foo2)) == - iter); - } - - { -- auto iter = ranges::find_if(v, MatchesUniquePtr(foo2)); -+ auto iter = std::ranges::find_if(v, MatchesUniquePtr(foo2)); - ASSERT_TRUE(iter != v.end()); - EXPECT_EQ(foo2, iter->get()); -- EXPECT_TRUE(ranges::find_if(v, MatchesUniquePtr(raw_foo2)) == iter); -- EXPECT_TRUE(ranges::find_if(v, MatchesUniquePtr(dangling_foo2)) == iter); -+ EXPECT_TRUE(std::ranges::find_if(v, MatchesUniquePtr(raw_foo2)) == iter); -+ EXPECT_TRUE(std::ranges::find_if(v, MatchesUniquePtr(dangling_foo2)) == -+ iter); - } - -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher(foo3)) == v.end()); -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher(raw_foo3)) == v.end()); -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher(dangling_foo3)) == -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher(foo3)) == v.end()); -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher(raw_foo3)) == -+ v.end()); -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher(dangling_foo3)) == - v.end()); - -- EXPECT_TRUE(ranges::find_if(v, MatchesUniquePtr(foo3)) == v.end()); -- EXPECT_TRUE(ranges::find_if(v, MatchesUniquePtr(raw_foo3)) == v.end()); -- EXPECT_TRUE(ranges::find_if(v, MatchesUniquePtr(dangling_foo3)) == v.end()); -+ EXPECT_TRUE(std::ranges::find_if(v, MatchesUniquePtr(foo3)) == v.end()); -+ EXPECT_TRUE(std::ranges::find_if(v, MatchesUniquePtr(raw_foo3)) == v.end()); -+ EXPECT_TRUE(std::ranges::find_if(v, MatchesUniquePtr(dangling_foo3)) == -+ v.end()); - - raw_foo1 = nullptr; - raw_foo2 = nullptr; -@@ -176,48 +181,51 @@ TEST(UniquePtrMatcherTest, Deleter) { - raw_ptr dangling_foo3 = foo3; - - { -- auto iter = ranges::find_if(v, UniquePtrMatcher(foo1)); -+ auto iter = -+ std::ranges::find_if(v, UniquePtrMatcher(foo1)); - ASSERT_TRUE(iter != v.end()); - EXPECT_EQ(foo1, iter->get()); -- EXPECT_TRUE(ranges::find_if( -+ EXPECT_TRUE(std::ranges::find_if( - v, UniquePtrMatcher(raw_foo1)) == iter); -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher( -- dangling_foo1)) == iter); -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher( -+ dangling_foo1)) == iter); - } - - { -- auto iter = ranges::find_if(v, UniquePtrMatcher(foo2)); -+ auto iter = -+ std::ranges::find_if(v, UniquePtrMatcher(foo2)); - ASSERT_TRUE(iter != v.end()); - EXPECT_EQ(foo2, iter->get()); -- EXPECT_TRUE(ranges::find_if( -+ EXPECT_TRUE(std::ranges::find_if( - v, UniquePtrMatcher(raw_foo2)) == iter); -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher( -- dangling_foo2)) == iter); -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher( -+ dangling_foo2)) == iter); - } - - { -- auto iter = ranges::find_if(v, MatchesUniquePtr(foo2)); -+ auto iter = -+ std::ranges::find_if(v, MatchesUniquePtr(foo2)); - ASSERT_TRUE(iter != v.end()); - EXPECT_EQ(foo2, iter->get()); -- EXPECT_TRUE(ranges::find_if( -+ EXPECT_TRUE(std::ranges::find_if( - v, MatchesUniquePtr(raw_foo2)) == iter); -- EXPECT_TRUE(ranges::find_if(v, MatchesUniquePtr( -- dangling_foo2)) == iter); -+ EXPECT_TRUE(std::ranges::find_if(v, MatchesUniquePtr( -+ dangling_foo2)) == iter); - } - -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher(foo3)) == -- v.end()); -- EXPECT_TRUE(ranges::find_if( -+ EXPECT_TRUE(std::ranges::find_if( -+ v, UniquePtrMatcher(foo3)) == v.end()); -+ EXPECT_TRUE(std::ranges::find_if( - v, UniquePtrMatcher(raw_foo3)) == v.end()); -- EXPECT_TRUE(ranges::find_if(v, UniquePtrMatcher( -- dangling_foo3)) == v.end()); -+ EXPECT_TRUE(std::ranges::find_if(v, UniquePtrMatcher( -+ dangling_foo3)) == v.end()); - -- EXPECT_TRUE(ranges::find_if(v, MatchesUniquePtr(foo3)) == -- v.end()); -- EXPECT_TRUE(ranges::find_if( -+ EXPECT_TRUE(std::ranges::find_if( -+ v, MatchesUniquePtr(foo3)) == v.end()); -+ EXPECT_TRUE(std::ranges::find_if( - v, MatchesUniquePtr(raw_foo3)) == v.end()); -- EXPECT_TRUE(ranges::find_if(v, MatchesUniquePtr( -- dangling_foo3)) == v.end()); -+ EXPECT_TRUE(std::ranges::find_if(v, MatchesUniquePtr( -+ dangling_foo3)) == v.end()); - - raw_foo1 = nullptr; - raw_foo2 = nullptr; -diff --git a/base/cpu.cc b/base/cpu.cc -index 91e1a7124a5d8..de92343e609eb 100644 ---- a/base/cpu.cc -+++ b/base/cpu.cc -@@ -21,9 +21,10 @@ - #include - #include - -+#include -+ - #include "base/files/file_util.h" - #include "base/numerics/checked_math.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_split.h" - #include "base/strings/string_util.h" -diff --git a/base/debug/alias_unittest.cc b/base/debug/alias_unittest.cc -index 9c7e02e129579..32a8c3804d9f7 100644 ---- a/base/debug/alias_unittest.cc -+++ b/base/debug/alias_unittest.cc -@@ -8,7 +8,6 @@ - #include - #include - --#include "base/ranges/algorithm.h" - #include "testing/gtest/include/gtest/gtest.h" - - TEST(DebugAlias, Test) { -diff --git a/base/debug/stack_trace_win.cc b/base/debug/stack_trace_win.cc -index f065de4118199..1a5e3d64ddb49 100644 ---- a/base/debug/stack_trace_win.cc -+++ b/base/debug/stack_trace_win.cc -@@ -17,7 +17,6 @@ - #include "base/files/file_path.h" - #include "base/logging.h" - #include "base/memory/singleton.h" --#include "base/ranges/algorithm.h" - #include "base/strings/strcat_win.h" - #include "base/strings/string_util.h" - #include "base/synchronization/lock.h" -@@ -338,7 +337,7 @@ StackTrace::StackTrace(const CONTEXT* context) { - void StackTrace::InitTrace(const CONTEXT* context_record) { - if (ShouldSuppressOutput()) { - CHECK_EQ(count_, 0U); -- base::ranges::fill(trace_, nullptr); -+ std::ranges::fill(trace_, nullptr); - return; - } - -@@ -383,7 +382,7 @@ void StackTrace::InitTrace(const CONTEXT* context_record) { - trace_[count_++] = reinterpret_cast(stack_frame.AddrPC.Offset); - } - -- base::ranges::fill(span(trace_).last(trace_.size() - count_), nullptr); -+ std::ranges::fill(span(trace_).last(trace_.size() - count_), nullptr); - } - - // static -diff --git a/base/debug/task_trace.cc b/base/debug/task_trace.cc -index d767d265a8ae1..eda255e693fae 100644 ---- a/base/debug/task_trace.cc -+++ b/base/debug/task_trace.cc -@@ -9,7 +9,6 @@ - #include - - #include "base/pending_task.h" --#include "base/ranges/algorithm.h" - #include "base/task/common/task_annotator.h" - #include "build/build_config.h" - -@@ -53,7 +52,7 @@ TaskTrace::TaskTrace() { - } - std::array task_trace; - task_trace[0] = current_task->posted_from.program_counter(); -- ranges::copy(current_task->task_backtrace, task_trace.begin() + 1); -+ std::ranges::copy(current_task->task_backtrace, task_trace.begin() + 1); - size_t length = 0; - while (length < task_trace.size() && task_trace[length]) { - ++length; -diff --git a/base/feature_list_unittest.cc b/base/feature_list_unittest.cc -index 51f4b38ca57b8..683a2984d53ac 100644 ---- a/base/feature_list_unittest.cc -+++ b/base/feature_list_unittest.cc -@@ -6,6 +6,7 @@ - - #include - -+#include - #include - #include - #include -@@ -21,7 +22,6 @@ - #include "base/metrics/field_trial.h" - #include "base/metrics/field_trial_param_associator.h" - #include "base/metrics/persistent_memory_allocator.h" --#include "base/ranges/algorithm.h" - #include "base/strings/strcat.h" - #include "base/strings/string_util.h" - #include "base/strings/stringprintf.h" -@@ -46,7 +46,7 @@ BASE_FEATURE(kFeatureOffByDefault, - std::string SortFeatureListString(const std::string& feature_list) { - std::vector features = - FeatureList::SplitFeatureListString(feature_list); -- ranges::sort(features); -+ std::ranges::sort(features); - return JoinString(features, ","); - } - -diff --git a/base/files/file_path.cc b/base/files/file_path.cc -index f7aa21799cc44..6f3f954abcf75 100644 ---- a/base/files/file_path.cc -+++ b/base/files/file_path.cc -@@ -18,7 +18,6 @@ - #include "base/files/safe_base_name.h" - #include "base/numerics/safe_conversions.h" - #include "base/pickle.h" --#include "base/ranges/algorithm.h" - #include "base/strings/strcat.h" - #include "base/strings/string_util.h" - #include "base/strings/sys_string_conversions.h" -@@ -259,7 +258,7 @@ std::vector FilePath::GetComponents() const { - ret_val.emplace_back(dir.value(), 0, letter + 1); - } - -- ranges::reverse(ret_val); -+ std::ranges::reverse(ret_val); - return ret_val; - } - -diff --git a/base/files/file_path_watcher_kqueue.cc b/base/files/file_path_watcher_kqueue.cc -index db52862fb4b3c..2387e95a42f1e 100644 ---- a/base/files/file_path_watcher_kqueue.cc -+++ b/base/files/file_path_watcher_kqueue.cc -@@ -13,6 +13,7 @@ - #include - #include - -+#include - #include - #include - -@@ -20,7 +21,6 @@ - #include "base/files/file_util.h" - #include "base/functional/bind.h" - #include "base/logging.h" --#include "base/ranges/algorithm.h" - #include "base/strings/stringprintf.h" - #include "base/task/sequenced_task_runner.h" - #include "base/threading/scoped_blocking_call.h" -@@ -332,7 +332,7 @@ void FilePathWatcherKQueue::Cancel() { - DPLOG(ERROR) << "close kqueue"; - } - kqueue_ = -1; -- base::ranges::for_each(events_, ReleaseEvent); -+ std::ranges::for_each(events_, ReleaseEvent); - events_.clear(); - callback_.Reset(); - } -diff --git a/base/files/file_util.cc b/base/files/file_util.cc -index f38ee3ef88ddc..30bdcc0cb887e 100644 ---- a/base/files/file_util.cc -+++ b/base/files/file_util.cc -@@ -20,6 +20,7 @@ - #endif - #include - -+#include - #include - #include - #include -@@ -35,7 +36,6 @@ - #include "base/functional/function_ref.h" - #include "base/notreached.h" - #include "base/posix/eintr_wrapper.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_util.h" - #include "base/strings/utf_string_conversions.h" -@@ -504,7 +504,7 @@ FilePath GetUniquePath(const FilePath& path) { - FilePath GetUniquePathWithSuffixFormat(const FilePath& path, - base::cstring_view suffix_format) { - DCHECK(!path.empty()); -- DCHECK_EQ(base::ranges::count(suffix_format, '%'), 1); -+ DCHECK_EQ(std::ranges::count(suffix_format, '%'), 1); - DCHECK(base::Contains(suffix_format, "%d")); - - if (!PathExists(path)) { -diff --git a/base/hash/hash_perftest.cc b/base/hash/hash_perftest.cc -index 6e1476660edd0..1d7d82992e0f5 100644 ---- a/base/hash/hash_perftest.cc -+++ b/base/hash/hash_perftest.cc -@@ -7,13 +7,13 @@ - #include - #include - -+#include - #include - #include - - #include "base/containers/span.h" - #include "base/hash/sha1.h" - #include "base/rand_util.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_util.h" - #include "base/time/time.h" -@@ -59,7 +59,7 @@ void RunTest(const char* hash_name, - utime[i] = TimeTicks::Now() - start; - total_test_time += utime[i]; - } -- ranges::sort(utime); -+ std::ranges::sort(utime); - } - - reporter.AddResult(kMetricRuntime, total_test_time.InMicrosecondsF()); -@@ -78,8 +78,9 @@ void RunTest(const char* hash_name, - - // Convert to a comma-separated string so we can report every data point. - std::vector rate_strings(utime.size()); -- ranges::transform(utime, rate_strings.begin(), -- [rate](const auto& t) { return NumberToString(rate(t)); }); -+ std::ranges::transform(utime, rate_strings.begin(), [rate](const auto& t) { -+ return NumberToString(rate(t)); -+ }); - reporter.AddResultList(kMetricThroughput, JoinString(rate_strings, ",")); - } - -diff --git a/base/i18n/break_iterator_unittest.cc b/base/i18n/break_iterator_unittest.cc -index ff72e0971968f..72ee6c99c283d 100644 ---- a/base/i18n/break_iterator_unittest.cc -+++ b/base/i18n/break_iterator_unittest.cc -@@ -6,10 +6,10 @@ - - #include - -+#include - #include - #include - --#include "base/ranges/algorithm.h" - #include "base/strings/string_util.h" - #include "base/strings/utf_string_conversions.h" - #include "build/build_config.h" -@@ -407,7 +407,7 @@ TEST(BreakIteratorTest, IsSentenceBoundary) { - sentence_breaks.push_back(24); - sentence_breaks.push_back(42); - for (size_t i = 0; i < str.size(); i++) { -- if (ranges::find(sentence_breaks, i) != sentence_breaks.end()) { -+ if (std::ranges::find(sentence_breaks, i) != sentence_breaks.end()) { - EXPECT_TRUE(iter.IsSentenceBoundary(i)) << " at index=" << i; - } else { - EXPECT_FALSE(iter.IsSentenceBoundary(i)) << " at index=" << i; -diff --git a/base/immediate_crash_unittest.cc b/base/immediate_crash_unittest.cc -index afceeb3dc1d5c..0ba4032b2b0ab 100644 ---- a/base/immediate_crash_unittest.cc -+++ b/base/immediate_crash_unittest.cc -@@ -11,6 +11,7 @@ - - #include - -+#include - #include - - #include "base/base_paths.h" -@@ -18,7 +19,6 @@ - #include "base/containers/span.h" - #include "base/files/file_path.h" - #include "base/path_service.h" --#include "base/ranges/algorithm.h" - #include "base/scoped_native_library.h" - #include "base/strings/string_number_conversions.h" - #include "build/build_config.h" -@@ -245,7 +245,7 @@ TEST(ImmediateCrashTest, ExpectedOpcodeSequence) { - // false - but let's still go through the motions above so we spot any - // problems in this _test code_ in as many build permutations as possible. - #if defined(OFFICIAL_BUILD) -- auto it = ranges::find(body, kRet); -+ auto it = std::ranges::find(body, kRet); - ASSERT_NE(body.end(), it) << "Failed to find return opcode"; - it++; - -diff --git a/base/ios/crb_protocol_observers.mm b/base/ios/crb_protocol_observers.mm -index 64087386bc5ee..18b66b7b7df8d 100644 ---- a/base/ios/crb_protocol_observers.mm -+++ b/base/ios/crb_protocol_observers.mm -@@ -7,12 +7,12 @@ - #include - #include - -+#include - #include - - #include "base/check.h" - #include "base/containers/contains.h" - #include "base/notreached.h" --#include "base/ranges/algorithm.h" - - @interface CRBProtocolObservers () { - Protocol* _protocol; -@@ -116,7 +116,7 @@ id Iterator::GetNext() { - - - (void)removeObserver:(id)observer { - DCHECK(observer); -- auto it = base::ranges::find(_observers, observer); -+ auto it = std::ranges::find(_observers, observer); - if (it != _observers.end()) { - if (_invocationDepth) { - *it = nil; -diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc -index 256a8f7a8cf3d..3a2ffe913b9cb 100644 ---- a/base/json/json_parser.cc -+++ b/base/json/json_parser.cc -@@ -9,6 +9,7 @@ - - #include "base/json/json_parser.h" - -+#include - #include - #include - #include -@@ -22,7 +23,6 @@ - #include "base/metrics/histogram_functions.h" - #include "base/notreached.h" - #include "base/numerics/safe_conversions.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_util.h" - #include "base/strings/stringprintf.h" -@@ -445,7 +445,7 @@ std::optional JSONParser::ConsumeDictionary() { - ConsumeChar(); // Closing '}'. - // Reverse |dict_storage| to keep the last of elements with the same key in - // the input. -- ranges::reverse(values); -+ std::ranges::reverse(values); - return Value(Value::Dict(std::make_move_iterator(values.begin()), - std::make_move_iterator(values.end()))); - } -diff --git a/base/mac/process_requirement.cc b/base/mac/process_requirement.cc -index 5fec51cd8c062..c717af1ba7a1d 100644 ---- a/base/mac/process_requirement.cc -+++ b/base/mac/process_requirement.cc -@@ -10,6 +10,7 @@ - #include - #include - -+#include - #include - - #include "base/apple/mach_logging.h" -@@ -28,7 +29,6 @@ - #include "base/metrics/histogram_functions.h" - #include "base/no_destructor.h" - #include "base/notreached.h" --#include "base/ranges/algorithm.h" - #include "base/strings/strcat.h" - #include "base/strings/string_util.h" - #include "base/task/thread_pool.h" -@@ -246,7 +246,7 @@ ProcessRequirement::Builder ProcessRequirement::Builder::Identifier( - ProcessRequirement::Builder ProcessRequirement::Builder::IdentifierIsOneOf( - std::vector identifiers) && { - CHECK(identifiers.size()); -- CHECK(base::ranges::all_of(identifiers, &std::string::size)); -+ CHECK(std::ranges::all_of(identifiers, &std::string::size)); - CHECK(identifiers_.empty()); - identifiers_ = std::move(identifiers); - return std::move(*this); -@@ -317,7 +317,7 @@ ProcessRequirement::Builder::HasSameCertificateType() && { - ProcessRequirement::Builder ProcessRequirement::Builder::TeamIdentifier( - std::string team_identifier) && { - CHECK(team_identifier_.empty()); -- CHECK(base::ranges::all_of(team_identifier, base::IsAsciiAlphaNumeric)); -+ CHECK(std::ranges::all_of(team_identifier, base::IsAsciiAlphaNumeric)); - team_identifier_ = std::move(team_identifier); - has_same_team_identifier_called_ = false; - return std::move(*this); -diff --git a/base/memory/platform_shared_memory_region_unittest.cc b/base/memory/platform_shared_memory_region_unittest.cc -index db266037cec45..34dc53fa27018 100644 ---- a/base/memory/platform_shared_memory_region_unittest.cc -+++ b/base/memory/platform_shared_memory_region_unittest.cc -@@ -4,12 +4,12 @@ - - #include "base/memory/platform_shared_memory_region.h" - -+#include - #include - - #include "base/check.h" - #include "base/memory/shared_memory_mapping.h" - #include "base/process/process_metrics.h" --#include "base/ranges/algorithm.h" - #include "base/system/sys_info.h" - #include "base/test/gtest_util.h" - #include "base/test/test_shared_memory_util.h" -@@ -259,7 +259,7 @@ void CheckReadOnlyMapProtection(void* addr) { - ASSERT_TRUE(base::debug::ReadProcMaps(&proc_maps)); - std::vector regions; - ASSERT_TRUE(base::debug::ParseProcMaps(proc_maps, ®ions)); -- auto it = ranges::find_if( -+ auto it = std::ranges::find_if( - regions, [addr](const base::debug::MappedMemoryRegion& region) { - return region.start == reinterpret_cast(addr); - }); -diff --git a/base/memory/shared_memory_mapping_unittest.cc b/base/memory/shared_memory_mapping_unittest.cc -index baf013fe7e90d..d8ead663827f6 100644 ---- a/base/memory/shared_memory_mapping_unittest.cc -+++ b/base/memory/shared_memory_mapping_unittest.cc -@@ -6,6 +6,7 @@ - - #include - -+#include - #include - #include - #include -@@ -14,7 +15,6 @@ - #include "base/containers/span.h" - #include "base/memory/read_only_shared_memory_region.h" - #include "base/memory/writable_shared_memory_region.h" --#include "base/ranges/algorithm.h" - #include "build/build_config.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -74,7 +74,7 @@ TEST_F(SharedMemoryMappingTest, SpanWithAutoDeducedElementCount) { - span read_span = read_mapping_.GetMemoryAsSpan(); - ASSERT_EQ(2u, read_span.size()); - -- ranges::fill(write_span, 0); -+ std::ranges::fill(write_span, 0); - EXPECT_EQ(0u, read_span[0]); - EXPECT_EQ(0u, read_span[1]); - -@@ -100,7 +100,7 @@ TEST_F(SharedMemoryMappingTest, SpanWithExplicitElementCount) { - span read_span_2 = read_mapping_.GetMemoryAsSpan(1); - ASSERT_EQ(1u, read_span_2.size()); - -- ranges::fill(write_span, 0); -+ std::ranges::fill(write_span, 0); - EXPECT_EQ(0u, read_span[0]); - EXPECT_EQ(0u, read_span[1]); - EXPECT_EQ(0u, read_span_2[0]); -@@ -112,7 +112,7 @@ TEST_F(SharedMemoryMappingTest, SpanWithExplicitElementCount) { - EXPECT_EQ(0x08070605u, read_span[1]); - EXPECT_EQ(0x04030201u, read_span_2[0]); - -- ranges::fill(write_span_2, 0); -+ std::ranges::fill(write_span_2, 0); - EXPECT_EQ(0u, read_span[0]); - EXPECT_EQ(0x08070605u, read_span[1]); - EXPECT_EQ(0u, read_span_2[0]); -diff --git a/base/message_loop/message_pump_epoll.cc b/base/message_loop/message_pump_epoll.cc -index ad5c1ee8eca95..d99f576e13556 100644 ---- a/base/message_loop/message_pump_epoll.cc -+++ b/base/message_loop/message_pump_epoll.cc -@@ -11,6 +11,7 @@ - - #include - -+#include - #include - #include - #include -@@ -24,7 +25,6 @@ - #include "base/metrics/histogram_macros.h" - #include "base/numerics/safe_conversions.h" - #include "base/posix/eintr_wrapper.h" --#include "base/ranges/algorithm.h" - #include "base/threading/thread_checker.h" - #include "base/time/time.h" - #include "base/trace_event/base_tracing.h" -@@ -425,7 +425,7 @@ void MessagePumpEpoll::UnregisterInterest( - - EpollEventEntry& entry = entry_it->second; - auto& interests = entry.interests; -- auto* it = ranges::find(interests, interest); -+ auto* it = std::ranges::find(interests, interest); - CHECK(it != interests.end(), base::NotFatalUntil::M125); - interests.erase(it); - -diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc -index e39b9690f621a..4c5b50e7acee7 100644 ---- a/base/metrics/histogram.cc -+++ b/base/metrics/histogram.cc -@@ -35,7 +35,6 @@ - #include "base/metrics/statistics_recorder.h" - #include "base/notreached.h" - #include "base/pickle.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util.h" - #include "base/strings/utf_string_conversions.h" - #include "base/synchronization/lock.h" -@@ -1222,7 +1221,7 @@ class CustomHistogram::Factory : public Histogram::Factory { - std::vector ranges = *custom_ranges_; - ranges.push_back(0); // Ensure we have a zero value. - ranges.push_back(HistogramBase::kSampleType_MAX); -- ranges::sort(ranges); -+ std::ranges::sort(ranges); - auto removed = std::ranges::unique(ranges); - ranges.erase(removed.begin(), removed.end()); - -diff --git a/base/metrics/statistics_recorder.cc b/base/metrics/statistics_recorder.cc -index bfde72d541c9d..5c3d3e9510673 100644 ---- a/base/metrics/statistics_recorder.cc -+++ b/base/metrics/statistics_recorder.cc -@@ -9,6 +9,7 @@ - - #include "base/metrics/statistics_recorder.h" - -+#include - #include - - #include "base/at_exit.h" -@@ -23,7 +24,6 @@ - #include "base/metrics/metrics_hashes.h" - #include "base/metrics/persistent_histogram_allocator.h" - #include "base/metrics/record_histogram_checker.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util.h" - #include "base/strings/stringprintf.h" - #include "base/values.h" -@@ -523,7 +523,7 @@ StatisticsRecorder::Histograms StatisticsRecorder::GetHistograms( - - // static - StatisticsRecorder::Histograms StatisticsRecorder::Sort(Histograms histograms) { -- ranges::sort(histograms, &HistogramNameLesser); -+ std::ranges::sort(histograms, &HistogramNameLesser); - return histograms; - } - -diff --git a/base/metrics/user_metrics.cc b/base/metrics/user_metrics.cc -index f48d978993f5a..0732582711403 100644 ---- a/base/metrics/user_metrics.cc -+++ b/base/metrics/user_metrics.cc -@@ -6,12 +6,12 @@ - - #include - -+#include - #include - - #include "base/functional/bind.h" - #include "base/lazy_instance.h" - #include "base/location.h" --#include "base/ranges/algorithm.h" - #include "base/threading/thread_checker.h" - #include "base/time/time.h" - #include "base/trace_event/base_tracing.h" -@@ -69,7 +69,7 @@ void RemoveActionCallback(const ActionCallback& callback) { - DCHECK(g_task_runner.Get()); - DCHECK(g_task_runner.Get()->BelongsToCurrentThread()); - std::vector* callbacks = g_callbacks.Pointer(); -- const auto i = ranges::find(*callbacks, callback); -+ const auto i = std::ranges::find(*callbacks, callback); - if (i != callbacks->end()) { - callbacks->erase(i); - } -diff --git a/base/nix/mime_util_xdg.cc b/base/nix/mime_util_xdg.cc -index 2f77bedc0dabc..4abd08fd454a1 100644 ---- a/base/nix/mime_util_xdg.cc -+++ b/base/nix/mime_util_xdg.cc -@@ -4,6 +4,7 @@ - - #include "base/nix/mime_util_xdg.h" - -+#include - #include - #include - -@@ -16,7 +17,6 @@ - #include "base/nix/xdg_util.h" - #include "base/no_destructor.h" - #include "base/numerics/byte_conversions.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "build/build_config.h" -@@ -262,7 +262,7 @@ std::string GetFileMimeType(const FilePath& filepath) { - - Time now = Time::Now(); - if (last_check + Seconds(5) < now) { -- if (ranges::any_of(*xdg_mime_files, [](const FileInfo& file_info) { -+ if (std::ranges::any_of(*xdg_mime_files, [](const FileInfo& file_info) { - File::Info info; - return !GetFileInfo(file_info.path, &info) || - info.last_modified != file_info.last_modified; -diff --git a/base/observer_list.h b/base/observer_list.h -index 8deb1b264ffb7..73476630a8b65 100644 ---- a/base/observer_list.h -+++ b/base/observer_list.h -@@ -21,7 +21,6 @@ - #include "base/dcheck_is_on.h" - #include "base/notreached.h" - #include "base/observer_list_internal.h" --#include "base/ranges/algorithm.h" - #include "base/sequence_checker.h" - #include "build/build_config.h" - -@@ -325,7 +324,7 @@ class ObserverList { - // not in this list. - void RemoveObserver(const ObserverType* obs) { - DCHECK(obs); -- const auto it = ranges::find_if( -+ const auto it = std::ranges::find_if( - observers_, [obs](const auto& o) { return o.IsEqual(obs); }); - if (it == observers_.end()) { - return; -@@ -349,7 +348,7 @@ class ObserverList { - if (obs == nullptr) { - return false; - } -- return ranges::find_if(observers_, [obs](const auto& o) { -+ return std::ranges::find_if(observers_, [obs](const auto& o) { - return o.IsEqual(obs); - }) != observers_.end(); - } -diff --git a/base/power_monitor/battery_level_provider.cc b/base/power_monitor/battery_level_provider.cc -index afd51747de556..7ec3ce6bd4b01 100644 ---- a/base/power_monitor/battery_level_provider.cc -+++ b/base/power_monitor/battery_level_provider.cc -@@ -4,8 +4,9 @@ - - #include "base/power_monitor/battery_level_provider.h" - -+#include -+ - #include "base/power_monitor/power_monitor_buildflags.h" --#include "base/ranges/algorithm.h" - - namespace base { - -@@ -29,7 +30,7 @@ BatteryLevelProvider::BatteryState BatteryLevelProvider::MakeBatteryState( - state.battery_count = static_cast(battery_details.size()); - state.is_external_power_connected = - battery_details.size() == 0 || -- base::ranges::any_of(battery_details, [](const BatteryDetails& details) { -+ std::ranges::any_of(battery_details, [](const BatteryDetails& details) { - return details.is_external_power_connected; - }); - -diff --git a/base/process/process_metrics_unittest.cc b/base/process/process_metrics_unittest.cc -index 0848bd5248659..e7c4c8d072369 100644 ---- a/base/process/process_metrics_unittest.cc -+++ b/base/process/process_metrics_unittest.cc -@@ -12,6 +12,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -30,7 +31,6 @@ - #include "base/process/launch.h" - #include "base/process/process.h" - #include "base/process/process_handle.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_util.h" - #include "base/strings/stringprintf.h" -@@ -1074,12 +1074,12 @@ TEST(ProcessMetricsTestLinux, GetCumulativeCPUUsagePerThread) { - - // Should have at least the test runner thread and the thread spawned above. - EXPECT_GE(prev_thread_times.size(), 2u); -- EXPECT_TRUE(ranges::any_of( -+ EXPECT_TRUE(std::ranges::any_of( - prev_thread_times, - [&thread1](const std::pair& entry) { - return entry.first == thread1.GetThreadId(); - })); -- EXPECT_TRUE(ranges::any_of( -+ EXPECT_TRUE(std::ranges::any_of( - prev_thread_times, - [](const std::pair& entry) { - return entry.first == base::PlatformThread::CurrentId(); -@@ -1096,7 +1096,7 @@ TEST(ProcessMetricsTestLinux, GetCumulativeCPUUsagePerThread) { - - // The stopped thread may still be reported until the kernel cleans it up. - EXPECT_GE(prev_thread_times.size(), 1u); -- EXPECT_TRUE(ranges::any_of( -+ EXPECT_TRUE(std::ranges::any_of( - current_thread_times, - [](const std::pair& entry) { - return entry.first == base::PlatformThread::CurrentId(); -@@ -1104,7 +1104,7 @@ TEST(ProcessMetricsTestLinux, GetCumulativeCPUUsagePerThread) { - - // Reported times should not decrease. - for (const auto& entry : current_thread_times) { -- auto prev_it = ranges::find_if( -+ auto prev_it = std::ranges::find_if( - prev_thread_times, - [&entry]( - const std::pair& prev_entry) { -diff --git a/base/profiler/chrome_unwinder_android_32_unittest.cc b/base/profiler/chrome_unwinder_android_32_unittest.cc -index a21d8bba53dee..41b0cbc815f3d 100644 ---- a/base/profiler/chrome_unwinder_android_32_unittest.cc -+++ b/base/profiler/chrome_unwinder_android_32_unittest.cc -@@ -9,11 +9,12 @@ - - #include "base/profiler/chrome_unwinder_android_32.h" - -+#include -+ - #include "base/memory/aligned_memory.h" - #include "base/profiler/chrome_unwind_info_android_32.h" - #include "base/profiler/register_context_registers.h" - #include "base/profiler/stack_sampling_profiler_test_util.h" --#include "base/ranges/algorithm.h" - #include "base/test/gtest_util.h" - #include "build/build_config.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -1021,7 +1022,7 @@ class AlignedStackMemory { - stack_memory_(static_cast( - AlignedAlloc(size_ * sizeof(uintptr_t), 2 * sizeof(uintptr_t)))) { - DCHECK_EQ(size_ % 2, 0u); -- ranges::copy(values, stack_memory_.get()); -+ std::ranges::copy(values, stack_memory_.get()); - } - - uintptr_t stack_start_address() const { -diff --git a/base/profiler/metadata_recorder_unittest.cc b/base/profiler/metadata_recorder_unittest.cc -index 889d8ff4d353d..fecd31aa2804d 100644 ---- a/base/profiler/metadata_recorder_unittest.cc -+++ b/base/profiler/metadata_recorder_unittest.cc -@@ -4,9 +4,9 @@ - - #include "base/profiler/metadata_recorder.h" - -+#include - #include - --#include "base/ranges/algorithm.h" - #include "base/test/gtest_util.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -305,7 +305,7 @@ TEST(MetadataRecorderTest, ReclaimInactiveSlots) { - } - - MetadataRecorder::ItemArray items_arr; -- ranges::copy(items_set, items_arr.begin()); -+ std::ranges::copy(items_set, items_arr.begin()); - - MetadataRecorder::ItemArray recorder_items; - size_t recorder_item_count = -diff --git a/base/profiler/module_cache.cc b/base/profiler/module_cache.cc -index 622de92781abd..46f0f19eb608a 100644 ---- a/base/profiler/module_cache.cc -+++ b/base/profiler/module_cache.cc -@@ -4,12 +4,12 @@ - - #include "base/profiler/module_cache.h" - -+#include - #include - #include - #include - - #include "base/check_op.h" --#include "base/ranges/algorithm.h" - #include "base/strings/strcat.h" - - namespace base { -diff --git a/base/profiler/module_cache_unittest.cc b/base/profiler/module_cache_unittest.cc -index 7a5c4ab47e43d..7ba113845f12c 100644 ---- a/base/profiler/module_cache_unittest.cc -+++ b/base/profiler/module_cache_unittest.cc -@@ -4,6 +4,7 @@ - - #include "base/profiler/module_cache.h" - -+#include - #include - #include - #include -@@ -14,7 +15,6 @@ - #include "base/containers/adapters.h" - #include "base/functional/callback.h" - #include "base/functional/callback_helpers.h" --#include "base/ranges/algorithm.h" - #include "base/test/bind.h" - #include "build/build_config.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -355,7 +355,7 @@ TEST(ModuleCacheTest, CheckAgainstProcMaps) { - } - - const auto find_last_executable_region = [](const RegionVector& regions) { -- const auto rloc = base::ranges::find_if( -+ const auto rloc = std::ranges::find_if( - base::Reversed(regions), [](const debug::MappedMemoryRegion* region) { - return static_cast(region->permissions & - debug::MappedMemoryRegion::EXECUTE); -diff --git a/base/profiler/stack_sampler.cc b/base/profiler/stack_sampler.cc -index 67c903745e671..122fadf08b592 100644 ---- a/base/profiler/stack_sampler.cc -+++ b/base/profiler/stack_sampler.cc -@@ -4,6 +4,7 @@ - - #include "base/profiler/stack_sampler.h" - -+#include - #include - #include - -@@ -21,7 +22,6 @@ - #include "base/profiler/stack_copier.h" - #include "base/profiler/suspendable_thread_delegate.h" - #include "base/profiler/unwinder.h" --#include "base/ranges/algorithm.h" - #include "base/task/thread_pool.h" - - #if PA_BUILDFLAG(USE_PARTITION_ALLOC) -@@ -351,8 +351,8 @@ std::vector StackSampler::WalkStack( - do { - // Choose an authoritative unwinder for the current module. Use the first - // unwinder that thinks it can unwind from the current frame. -- auto unwinder = -- ranges::find_if(unwinders, [&stack](const UnwinderCapture& unwinder) { -+ auto unwinder = std::ranges::find_if( -+ unwinders, [&stack](const UnwinderCapture& unwinder) { - return GetUnwinder(unwinder)->CanUnwindFrom(stack.back()); - }); - if (unwinder == unwinders.end()) { -diff --git a/base/profiler/stack_sampling_profiler_unittest.cc b/base/profiler/stack_sampling_profiler_unittest.cc -index f220315e339e5..056359152db96 100644 ---- a/base/profiler/stack_sampling_profiler_unittest.cc -+++ b/base/profiler/stack_sampling_profiler_unittest.cc -@@ -7,6 +7,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -28,7 +29,6 @@ - #include "base/profiler/stack_sampler.h" - #include "base/profiler/stack_sampling_profiler_test_util.h" - #include "base/profiler/unwinder.h" --#include "base/ranges/algorithm.h" - #include "base/run_loop.h" - #include "base/scoped_native_library.h" - #include "base/strings/utf_string_conversions.h" -@@ -277,10 +277,10 @@ size_t WaitForSamplingComplete( - const std::vector>& infos) { - // Map unique_ptrs to something that WaitMany can accept. - std::vector sampling_completed_rawptrs(infos.size()); -- ranges::transform(infos, sampling_completed_rawptrs.begin(), -- [](const std::unique_ptr& info) { -- return &info.get()->completed; -- }); -+ std::ranges::transform(infos, sampling_completed_rawptrs.begin(), -+ [](const std::unique_ptr& info) { -+ return &info.get()->completed; -+ }); - // Wait for one profiler to finish. - return WaitableEvent::WaitMany(sampling_completed_rawptrs.data(), - sampling_completed_rawptrs.size()); -diff --git a/base/profiler/stack_unwind_data.cc b/base/profiler/stack_unwind_data.cc -index a05f9824048e4..f84ea489939ef 100644 ---- a/base/profiler/stack_unwind_data.cc -+++ b/base/profiler/stack_unwind_data.cc -@@ -4,6 +4,7 @@ - - #include "base/profiler/stack_unwind_data.h" - -+#include - #include - #include - -@@ -20,7 +21,6 @@ - #include "base/profiler/stack_copier.h" - #include "base/profiler/suspendable_thread_delegate.h" - #include "base/profiler/unwinder.h" --#include "base/ranges/algorithm.h" - - namespace base { - -diff --git a/base/sampling_heap_profiler/poisson_allocation_sampler.cc b/base/sampling_heap_profiler/poisson_allocation_sampler.cc -index aff16589f9f03..2637da2ee8776 100644 ---- a/base/sampling_heap_profiler/poisson_allocation_sampler.cc -+++ b/base/sampling_heap_profiler/poisson_allocation_sampler.cc -@@ -17,7 +17,6 @@ - #include "base/compiler_specific.h" - #include "base/no_destructor.h" - #include "base/rand_util.h" --#include "base/ranges/algorithm.h" - #include "build/build_config.h" - - namespace base { -@@ -451,7 +450,7 @@ void PoissonAllocationSampler::AddSamplesObserver(SamplesObserver* observer) { - - ScopedMuteThreadSamples no_reentrancy_scope; - AutoLock lock(mutex_); -- DCHECK(ranges::find(observers_, observer) == observers_.end()); -+ DCHECK(std::ranges::find(observers_, observer) == observers_.end()); - bool profiler_was_stopped = observers_.empty(); - observers_.push_back(observer); - -@@ -478,7 +477,7 @@ void PoissonAllocationSampler::RemoveSamplesObserver( - - ScopedMuteThreadSamples no_reentrancy_scope; - AutoLock lock(mutex_); -- auto it = ranges::find(observers_, observer); -+ auto it = std::ranges::find(observers_, observer); - CHECK(it != observers_.end(), base::NotFatalUntil::M125); - observers_.erase(it); - -diff --git a/base/scoped_multi_source_observation.h b/base/scoped_multi_source_observation.h -index c9a1cff6504a3..e440f592ff673 100644 ---- a/base/scoped_multi_source_observation.h -+++ b/base/scoped_multi_source_observation.h -@@ -7,12 +7,12 @@ - - #include - -+#include - #include - - #include "base/check.h" - #include "base/containers/contains.h" - #include "base/memory/raw_ptr.h" --#include "base/ranges/algorithm.h" - #include "base/scoped_observation_traits.h" - - namespace base { -@@ -64,7 +64,7 @@ class ScopedMultiSourceObservation { - - // Remove the object passed to the constructor as an observer from |source|. - void RemoveObservation(Source* source) { -- auto it = base::ranges::find(sources_, source); -+ auto it = std::ranges::find(sources_, source); - CHECK(it != sources_.end()); - sources_.erase(it); - Traits::RemoveObserver(source, observer_); -diff --git a/base/scoped_multi_source_observation_unittest.cc b/base/scoped_multi_source_observation_unittest.cc -index cf57c1ce06812..b73f2fc1c5f56 100644 ---- a/base/scoped_multi_source_observation_unittest.cc -+++ b/base/scoped_multi_source_observation_unittest.cc -@@ -4,9 +4,10 @@ - - #include "base/scoped_multi_source_observation.h" - -+#include -+ - #include "base/containers/contains.h" - #include "base/memory/raw_ptr.h" --#include "base/ranges/algorithm.h" - #include "base/scoped_observation_traits.h" - #include "base/test/gtest_util.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -33,7 +34,7 @@ void TestSource::AddObserver(TestSourceObserver* observer) { - } - - void TestSource::RemoveObserver(TestSourceObserver* observer) { -- auto it = base::ranges::find(observers_, observer); -+ auto it = std::ranges::find(observers_, observer); - ASSERT_TRUE(it != observers_.end()); - observers_.erase(it); - } -diff --git a/base/scoped_observation_unittest.cc b/base/scoped_observation_unittest.cc -index 7420418f4e484..354cd3128941d 100644 ---- a/base/scoped_observation_unittest.cc -+++ b/base/scoped_observation_unittest.cc -@@ -4,9 +4,10 @@ - - #include "base/scoped_observation.h" - -+#include -+ - #include "base/containers/contains.h" - #include "base/memory/raw_ptr.h" --#include "base/ranges/algorithm.h" - #include "base/scoped_observation_traits.h" - #include "testing/gtest/include/gtest/gtest.h" - -@@ -35,7 +36,7 @@ void TestSource::AddObserver(TestSourceObserver* observer) { - } - - void TestSource::RemoveObserver(TestSourceObserver* observer) { -- auto it = base::ranges::find(observers_, observer); -+ auto it = std::ranges::find(observers_, observer); - EXPECT_TRUE(it != observers_.end()); - observers_.erase(it); - } -diff --git a/base/sequence_checker_impl.cc b/base/sequence_checker_impl.cc -index bd2530a9e2486..737041866fef2 100644 ---- a/base/sequence_checker_impl.cc -+++ b/base/sequence_checker_impl.cc -@@ -11,7 +11,6 @@ - #include "base/compiler_specific.h" - #include "base/containers/contains.h" - #include "base/debug/stack_trace.h" --#include "base/ranges/algorithm.h" - #include "base/sequence_token.h" - #include "base/synchronization/lock_subtle.h" - #include "base/threading/platform_thread.h" -@@ -191,9 +190,9 @@ void SequenceCheckerImpl::EnsureAssigned() const { - // detail of `SequenceCheckerImpl` and doesn't provide mutual exclusion - // guarantees to the caller). - DCHECK(locks_.empty()); -- ranges::remove_copy(subtle::GetTrackedLocksHeldByCurrentThread(), -- std::back_inserter(locks_), -- reinterpret_cast(&lock_)); -+ std::ranges::remove_copy(subtle::GetTrackedLocksHeldByCurrentThread(), -+ std::back_inserter(locks_), -+ reinterpret_cast(&lock_)); - #endif // DCHECK_IS_ON() - - DCHECK(sequence_token_.IsValid()); -diff --git a/base/stl_util.h b/base/stl_util.h -index 6444742df5e15..3c2d97c7b17fb 100644 ---- a/base/stl_util.h -+++ b/base/stl_util.h -@@ -11,7 +11,6 @@ - #include - - #include "base/check.h" --#include "base/ranges/algorithm.h" - - namespace base { - -@@ -40,8 +39,8 @@ void STLClearObject(T* obj) { - // Returns a new ResultType containing the difference of two sorted containers. - template - ResultType STLSetDifference(const Arg1& a1, const Arg2& a2) { -- DCHECK(ranges::is_sorted(a1)); -- DCHECK(ranges::is_sorted(a2)); -+ DCHECK(std::ranges::is_sorted(a1)); -+ DCHECK(std::ranges::is_sorted(a2)); - ResultType difference; - std::set_difference(a1.begin(), a1.end(), a2.begin(), a2.end(), - std::inserter(difference, difference.end())); -@@ -51,8 +50,8 @@ ResultType STLSetDifference(const Arg1& a1, const Arg2& a2) { - // Returns a new ResultType containing the union of two sorted containers. - template - ResultType STLSetUnion(const Arg1& a1, const Arg2& a2) { -- DCHECK(ranges::is_sorted(a1)); -- DCHECK(ranges::is_sorted(a2)); -+ DCHECK(std::ranges::is_sorted(a1)); -+ DCHECK(std::ranges::is_sorted(a2)); - ResultType result; - std::set_union(a1.begin(), a1.end(), a2.begin(), a2.end(), - std::inserter(result, result.end())); -@@ -63,8 +62,8 @@ ResultType STLSetUnion(const Arg1& a1, const Arg2& a2) { - // containers. - template - ResultType STLSetIntersection(const Arg1& a1, const Arg2& a2) { -- DCHECK(ranges::is_sorted(a1)); -- DCHECK(ranges::is_sorted(a2)); -+ DCHECK(std::ranges::is_sorted(a1)); -+ DCHECK(std::ranges::is_sorted(a2)); - ResultType result; - std::set_intersection(a1.begin(), a1.end(), a2.begin(), a2.end(), - std::inserter(result, result.end())); -diff --git a/base/strings/cstring_view_unittest.cc b/base/strings/cstring_view_unittest.cc -index a84402ecb2c30..3ee338548f23f 100644 ---- a/base/strings/cstring_view_unittest.cc -+++ b/base/strings/cstring_view_unittest.cc -@@ -4,6 +4,7 @@ - - #include "base/strings/cstring_view.h" - -+#include - #include - #include - #include -@@ -11,7 +12,6 @@ - - #include "base/containers/span.h" - #include "base/debug/alias.h" --#include "base/ranges/algorithm.h" - #include "base/strings/strcat.h" - #include "base/test/gtest_util.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -1084,7 +1084,7 @@ TEST(CStringViewTest, Example_CtorLiteral) { - } - - TEST(CStringViewTest, CompatibleWithRanges) { -- EXPECT_EQ(2, ranges::count(cstring_view("hello"), 'l')); -+ EXPECT_EQ(2, std::ranges::count(cstring_view("hello"), 'l')); - } - - TEST(CStringViewTest, ConstructFromStringLiteralWithEmbeddedNul) { -diff --git a/base/strings/string_util.cc b/base/strings/string_util.cc -index 34754565b9494..b22ae4c3db902 100644 ---- a/base/strings/string_util.cc -+++ b/base/strings/string_util.cc -@@ -19,6 +19,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -27,7 +28,6 @@ - - #include "base/check_op.h" - #include "base/no_destructor.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util_impl_helpers.h" - #include "base/strings/string_util_internal.h" - #include "base/strings/utf_string_conversion_utils.h" -@@ -258,7 +258,7 @@ bool IsStringUTF8AllowingNoncharacters(std::string_view str) { - } - - bool EqualsASCII(std::u16string_view str, std::string_view ascii) { -- return ranges::equal(ascii, str); -+ return std::ranges::equal(ascii, str); - } - - bool StartsWith(std::string_view str, -diff --git a/base/strings/string_util_impl_helpers.h b/base/strings/string_util_impl_helpers.h -index 0240ce0e91684..001edb423541c 100644 ---- a/base/strings/string_util_impl_helpers.h -+++ b/base/strings/string_util_impl_helpers.h -@@ -20,7 +20,6 @@ - #include "base/check_op.h" - #include "base/logging.h" - #include "base/notreached.h" --#include "base/ranges/algorithm.h" - #include "base/third_party/icu/icu_utf.h" - - namespace base::internal { -@@ -587,9 +586,9 @@ std::optional> DoReplaceStringPlaceholders( - const size_t index = static_cast(*i - '1'); - if (offsets) { - ReplacementOffset r_offset(index, formatted.size()); -- r_offsets.insert( -- ranges::upper_bound(r_offsets, r_offset, &CompareParameter), -- r_offset); -+ r_offsets.insert(std::ranges::upper_bound(r_offsets, r_offset, -+ &CompareParameter), -+ r_offset); - } - if (index < substitutions) { - formatted.append(subst.at(index)); -diff --git a/base/strings/string_util_internal.h b/base/strings/string_util_internal.h -index 885a4ed9a2d91..997bd98b05bc8 100644 ---- a/base/strings/string_util_internal.h -+++ b/base/strings/string_util_internal.h -@@ -5,12 +5,11 @@ - #ifndef BASE_STRINGS_STRING_UTIL_INTERNAL_H_ - #define BASE_STRINGS_STRING_UTIL_INTERNAL_H_ - -+#include - #include - #include - #include - --#include "base/ranges/algorithm.h" -- - namespace base::internal { - - // ASCII-specific tolower. The standard library's tolower is locale sensitive, -@@ -57,7 +56,7 @@ constexpr int CompareCaseInsensitiveASCIIT(T a, T b) { - template - inline bool EqualsCaseInsensitiveASCIIT(std::basic_string_view a, - std::basic_string_view b) { -- return ranges::equal(a, b, [](auto lhs, auto rhs) { -+ return std::ranges::equal(a, b, [](auto lhs, auto rhs) { - return ToLowerASCII(lhs) == ToLowerASCII(rhs); - }); - } -diff --git a/base/strings/string_util_win.cc b/base/strings/string_util_win.cc -index 5b424cb88e2a9..7a7858b7c592a 100644 ---- a/base/strings/string_util_win.cc -+++ b/base/strings/string_util_win.cc -@@ -4,10 +4,10 @@ - - #include "base/strings/string_util_win.h" - -+#include - #include - #include - --#include "base/ranges/algorithm.h" - #include "base/strings/string_util_impl_helpers.h" - - namespace base { -@@ -78,7 +78,7 @@ bool ContainsOnlyChars(std::wstring_view input, std::wstring_view characters) { - } - - bool EqualsASCII(std::wstring_view str, std::string_view ascii) { -- return ranges::equal(ascii, str); -+ return std::ranges::equal(ascii, str); - } - - bool StartsWith(std::wstring_view str, -diff --git a/base/synchronization/waitable_event_posix.cc b/base/synchronization/waitable_event_posix.cc -index 4f0cdd4e46422..8cd673e9a1d69 100644 ---- a/base/synchronization/waitable_event_posix.cc -+++ b/base/synchronization/waitable_event_posix.cc -@@ -11,13 +11,13 @@ - - #include - -+#include - #include - #include - #include - - #include "base/check_op.h" - #include "base/memory/stack_allocated.h" --#include "base/ranges/algorithm.h" - #include "base/synchronization/condition_variable.h" - #include "base/synchronization/lock.h" - #include "base/threading/scoped_blocking_call.h" -@@ -242,7 +242,7 @@ size_t WaitableEvent::WaitManyImpl(WaitableEvent** raw_waitables, - - DCHECK_EQ(count, waitables.size()); - -- ranges::sort(waitables, cmp_fst_addr); -+ std::ranges::sort(waitables, cmp_fst_addr); - - // The set of waitables must be distinct. Since we have just sorted by - // address, we can check this cheaply by comparing pairs of consecutive -diff --git a/base/task/common/checked_lock_impl.cc b/base/task/common/checked_lock_impl.cc -index 70807fbf4f47e..eefd52e2d803e 100644 ---- a/base/task/common/checked_lock_impl.cc -+++ b/base/task/common/checked_lock_impl.cc -@@ -4,6 +4,7 @@ - - #include "base/task/common/checked_lock_impl.h" - -+#include - #include - #include - #include -@@ -13,7 +14,6 @@ - #include "base/lazy_instance.h" - #include "base/memory/raw_ptr.h" - #include "base/memory/raw_ptr_exclusion.h" --#include "base/ranges/algorithm.h" - #include "base/synchronization/condition_variable.h" - #include "base/task/common/checked_lock.h" - #include "base/threading/platform_thread.h" -@@ -50,7 +50,7 @@ class SafeAcquisitionTracker { - - void RecordRelease(const CheckedLockImpl* const lock) { - LockVector* acquired_locks = GetAcquiredLocksOnCurrentThread(); -- const auto iter_at_lock = ranges::find(*acquired_locks, lock); -+ const auto iter_at_lock = std::ranges::find(*acquired_locks, lock); - CHECK(iter_at_lock != acquired_locks->end(), base::NotFatalUntil::M125); - acquired_locks->erase(iter_at_lock); - } -diff --git a/base/task/common/operations_controller_unittest.cc b/base/task/common/operations_controller_unittest.cc -index 879d5a34d47b6..23b21791a98ad 100644 ---- a/base/task/common/operations_controller_unittest.cc -+++ b/base/task/common/operations_controller_unittest.cc -@@ -4,12 +4,12 @@ - - #include "base/task/common/operations_controller.h" - -+#include - #include - #include - #include - - #include "base/memory/raw_ref.h" --#include "base/ranges/algorithm.h" - #include "base/threading/platform_thread.h" - #include "base/threading/simple_thread.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -127,7 +127,8 @@ class TestThread : public SimpleThread { - if (!was_started) { - continue; - } -- if (ranges::any_of(tokens, [](const auto& token) { return !token; })) { -+ if (std::ranges::any_of(tokens, -+ [](const auto& token) { return !token; })) { - break; - } - } -diff --git a/base/task/common/task_annotator.cc b/base/task/common/task_annotator.cc -index bd6447b0d8cee..0b9700c620e4d 100644 ---- a/base/task/common/task_annotator.cc -+++ b/base/task/common/task_annotator.cc -@@ -18,7 +18,6 @@ - #include "base/hash/md5.h" - #include "base/logging.h" - #include "base/metrics/metrics_hashes.h" --#include "base/ranges/algorithm.h" - #include "base/time/time.h" - #include "base/trace_event/base_tracing.h" - #include "base/tracing_buildflags.h" -@@ -188,7 +187,7 @@ void TaskAnnotator::RunTaskImpl(PendingTask& pending_task) { - task_backtrace.back() = reinterpret_cast(0x0d00d1d1d178119); - - task_backtrace[1] = pending_task.posted_from.program_counter(); -- ranges::copy(pending_task.task_backtrace, task_backtrace.begin() + 2); -+ std::ranges::copy(pending_task.task_backtrace, task_backtrace.begin() + 2); - task_backtrace[kStackTaskTraceSnapshotSize - 2] = - reinterpret_cast(pending_task.ipc_hash); - debug::Alias(&task_backtrace); -diff --git a/base/task/sequence_manager/sequence_manager_impl.cc b/base/task/sequence_manager/sequence_manager_impl.cc -index f10835d6f2d91..6dd5570b406c2 100644 ---- a/base/task/sequence_manager/sequence_manager_impl.cc -+++ b/base/task/sequence_manager/sequence_manager_impl.cc -@@ -9,6 +9,7 @@ - - #include "base/task/sequence_manager/sequence_manager_impl.h" - -+#include - #include - #include - #include -@@ -29,7 +30,6 @@ - #include "base/notreached.h" - #include "base/observer_list.h" - #include "base/rand_util.h" --#include "base/ranges/algorithm.h" - #include "base/task/sequence_manager/enqueue_order.h" - #include "base/task/sequence_manager/task_queue_impl.h" - #include "base/task/sequence_manager/task_time_observer.h" -@@ -541,7 +541,7 @@ void SequenceManagerImpl::LogTaskDebugInfo( - case Settings::TaskLogging::kEnabledWithBacktrace: { - std::array task_trace; - task_trace[0] = task->posted_from.program_counter(); -- ranges::copy(task->task_backtrace, task_trace.begin() + 1); -+ std::ranges::copy(task->task_backtrace, task_trace.begin() + 1); - size_t length = 0; - while (length < task_trace.size() && task_trace[length]) { - ++length; -diff --git a/base/task/sequence_manager/task_queue_impl.cc b/base/task/sequence_manager/task_queue_impl.cc -index d3ee661a051fe..ba0dd3f467b10 100644 ---- a/base/task/sequence_manager/task_queue_impl.cc -+++ b/base/task/sequence_manager/task_queue_impl.cc -@@ -6,6 +6,7 @@ - - #include - -+#include - #include - #include - #include -@@ -18,7 +19,6 @@ - #include "base/metrics/histogram_macros.h" - #include "base/notreached.h" - #include "base/observer_list.h" --#include "base/ranges/algorithm.h" - #include "base/sequence_token.h" - #include "base/strings/stringprintf.h" - #include "base/task/common/scoped_defer_task_posting.h" -diff --git a/base/task/thread_pool/pooled_single_thread_task_runner_manager.cc b/base/task/thread_pool/pooled_single_thread_task_runner_manager.cc -index a00bbee259f4a..1290d0ad95526 100644 ---- a/base/task/thread_pool/pooled_single_thread_task_runner_manager.cc -+++ b/base/task/thread_pool/pooled_single_thread_task_runner_manager.cc -@@ -9,6 +9,7 @@ - - #include "base/task/thread_pool/pooled_single_thread_task_runner_manager.h" - -+#include - #include - #include - #include -@@ -21,7 +22,6 @@ - #include "base/memory/ptr_util.h" - #include "base/memory/raw_ptr.h" - #include "base/message_loop/message_pump.h" --#include "base/ranges/algorithm.h" - #include "base/strings/stringprintf.h" - #include "base/synchronization/atomic_flag.h" - #include "base/task/default_delayed_task_handle_delegate.h" -@@ -856,7 +856,7 @@ void PooledSingleThreadTaskRunnerManager::UnregisterWorkerThread( - return; - } - -- auto worker_iter = ranges::find(workers_, worker); -+ auto worker_iter = std::ranges::find(workers_, worker); - CHECK(worker_iter != workers_.end(), base::NotFatalUntil::M125); - worker_to_destroy = std::move(*worker_iter); - workers_.erase(worker_iter); -diff --git a/base/task/thread_pool/thread_group_impl.cc b/base/task/thread_pool/thread_group_impl.cc -index 581569f21e10a..72f81bef81981 100644 ---- a/base/task/thread_pool/thread_group_impl.cc -+++ b/base/task/thread_pool/thread_group_impl.cc -@@ -130,7 +130,7 @@ class ThreadGroupImpl::WorkerDelegate : public WorkerThread::Delegate, - template - bool ContainsWorker(const std::vector>& workers, - const WorkerThread* worker) { -- auto it = ranges::find_if( -+ auto it = std::ranges::find_if( - workers, - [worker](const scoped_refptr& i) { return i.get() == worker; }); - return it != workers.end(); -@@ -607,7 +607,7 @@ void ThreadGroupImpl::WorkerDelegate::CleanupLockRequired( - } - - // Remove the worker from |workers_|. -- auto worker_iter = ranges::find(outer_->workers_, worker); -+ auto worker_iter = std::ranges::find(outer_->workers_, worker); - CHECK(worker_iter != outer_->workers_.end(), base::NotFatalUntil::M125); - outer_->workers_.erase(worker_iter); - } -diff --git a/base/task/thread_pool/worker_thread_set.cc b/base/task/thread_pool/worker_thread_set.cc -index 2432732394075..2653d4adc6821 100644 ---- a/base/task/thread_pool/worker_thread_set.cc -+++ b/base/task/thread_pool/worker_thread_set.cc -@@ -4,9 +4,10 @@ - - #include "base/task/thread_pool/worker_thread_set.h" - -+#include -+ - #include "base/check_op.h" - #include "base/containers/contains.h" --#include "base/ranges/algorithm.h" - #include "base/task/thread_pool/worker_thread.h" - - namespace base::internal { -diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc -index 41db9c67b5a5d..17d8822430e66 100644 ---- a/base/test/launcher/test_launcher.cc -+++ b/base/test/launcher/test_launcher.cc -@@ -44,7 +44,6 @@ - #include "base/numerics/safe_conversions.h" - #include "base/process/kill.h" - #include "base/process/launch.h" --#include "base/ranges/algorithm.h" - #include "base/run_loop.h" - #include "base/strings/pattern.h" - #include "base/strings/strcat.h" -@@ -1935,7 +1934,7 @@ bool TestLauncher::ShuffleTests(CommandLine* command_line) { - - std::mt19937 randomizer; - randomizer.seed(shuffle_seed); -- ranges::shuffle(tests_, randomizer); -+ std::ranges::shuffle(tests_, randomizer); - - fprintf(stdout, "Randomizing with seed %u\n", shuffle_seed); - fflush(stdout); -diff --git a/base/test/trace_event_analyzer.cc b/base/test/trace_event_analyzer.cc -index bcc12c693070a..589e7d51e4398 100644 ---- a/base/test/trace_event_analyzer.cc -+++ b/base/test/trace_event_analyzer.cc -@@ -15,7 +15,6 @@ - #include "base/logging.h" - #include "base/memory/ptr_util.h" - #include "base/memory/ref_counted_memory.h" --#include "base/ranges/algorithm.h" - #include "base/run_loop.h" - #include "base/strings/pattern.h" - #include "base/trace_event/trace_buffer.h" -@@ -837,7 +836,7 @@ bool TraceAnalyzer::SetEvents(const std::string& json_events) { - if (!ParseEventsFromJson(json_events, &raw_events_)) { - return false; - } -- base::ranges::stable_sort(raw_events_, {}, &TraceEvent::timestamp); -+ std::ranges::stable_sort(raw_events_, {}, &TraceEvent::timestamp); - ParseMetadata(); - return true; - } -@@ -1030,7 +1029,7 @@ bool GetRateStats(const TraceEventVector& events, - deltas.push_back(delta); - } - -- base::ranges::sort(deltas); -+ std::ranges::sort(deltas); - - if (options) { - if (options->trim_min + options->trim_max > events.size() - kMinEvents) { -@@ -1047,8 +1046,8 @@ bool GetRateStats(const TraceEventVector& events, - delta_sum += deltas[i]; - } - -- stats->min_us = *base::ranges::min_element(deltas); -- stats->max_us = *base::ranges::max_element(deltas); -+ stats->min_us = *std::ranges::min_element(deltas); -+ stats->max_us = *std::ranges::max_element(deltas); - stats->mean_us = delta_sum / static_cast(num_deltas); - - double sum_mean_offsets_squared = 0.0; -diff --git a/base/threading/hang_watcher.cc b/base/threading/hang_watcher.cc -index c3582a5fb74e1..10505f18d0997 100644 ---- a/base/threading/hang_watcher.cc -+++ b/base/threading/hang_watcher.cc -@@ -4,6 +4,7 @@ - - #include "base/threading/hang_watcher.h" - -+#include - #include - #include - -@@ -18,7 +19,6 @@ - #include "base/metrics/field_trial_params.h" - #include "base/metrics/histogram_macros.h" - #include "base/power_monitor/power_monitor.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_number_conversions.h" - #include "base/synchronization/lock.h" - #include "base/synchronization/waitable_event.h" -@@ -858,10 +858,10 @@ void HangWatcher::WatchStateSnapShot::Init( - - // Sort |hung_watch_state_copies_| by order of decreasing hang severity so the - // most severe hang is first in the list. -- ranges::sort(hung_watch_state_copies_, -- [](const WatchStateCopy& lhs, const WatchStateCopy& rhs) { -- return lhs.deadline < rhs.deadline; -- }); -+ std::ranges::sort(hung_watch_state_copies_, -+ [](const WatchStateCopy& lhs, const WatchStateCopy& rhs) { -+ return lhs.deadline < rhs.deadline; -+ }); - } - - void HangWatcher::WatchStateSnapShot::Clear() { -@@ -1041,7 +1041,7 @@ void HangWatcher::BlockIfCaptureInProgress() { - void HangWatcher::UnregisterThread() { - AutoLock auto_lock(watch_state_lock_); - -- auto it = ranges::find( -+ auto it = std::ranges::find( - watch_states_, - internal::HangWatchState::GetHangWatchStateForCurrentThread(), - &std::unique_ptr::get); -diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc -index dd3b91416490a..1b58dffbeb5ea 100644 ---- a/base/trace_event/trace_log.cc -+++ b/base/trace_event/trace_log.cc -@@ -9,6 +9,7 @@ - - #include "base/trace_event/trace_log.h" - -+#include - #include - #include - #include -@@ -28,7 +29,6 @@ - #include "base/numerics/safe_conversions.h" - #include "base/process/process.h" - #include "base/process/process_metrics.h" --#include "base/ranges/algorithm.h" - #include "base/run_loop.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_split.h" -diff --git a/base/types/id_type.h b/base/types/id_type.h -index fad3fdead3929..64ed8241e77cb 100644 ---- a/base/types/id_type.h -+++ b/base/types/id_type.h -@@ -5,11 +5,11 @@ - #ifndef BASE_TYPES_ID_TYPE_H_ - #define BASE_TYPES_ID_TYPE_H_ - -+#include - #include - #include - #include - --#include "base/ranges/algorithm.h" - #include "base/types/strong_alias.h" - - namespace base { -@@ -62,22 +62,22 @@ class IdType : public StrongAlias { - kExtraInvalidValues...}; - - static_assert(std::is_unsigned_v || -- base::ranges::all_of(kAllInvalidValues, -- [](WrappedType v) { return v <= 0; }), -+ std::ranges::all_of(kAllInvalidValues, -+ [](WrappedType v) { return v <= 0; }), - "If signed, invalid values should be negative or equal to zero " - "to avoid overflow issues."); - -- static_assert(base::ranges::all_of(kAllInvalidValues, -- [](WrappedType v) { -- return kFirstGeneratedId != v; -- }), -+ static_assert(std::ranges::all_of(kAllInvalidValues, -+ [](WrappedType v) { -+ return kFirstGeneratedId != v; -+ }), - "The first generated ID cannot be invalid."); - - static_assert(std::is_unsigned_v || -- base::ranges::all_of(kAllInvalidValues, -- [](WrappedType v) { -- return kFirstGeneratedId > v; -- }), -+ std::ranges::all_of(kAllInvalidValues, -+ [](WrappedType v) { -+ return kFirstGeneratedId > v; -+ }), - "If signed, the first generated ID must be greater than all " - "invalid values so that the monotonically increasing " - "GenerateNextId method will never return an invalid value."); -@@ -106,7 +106,7 @@ class IdType : public StrongAlias { - : StrongAlias::StrongAlias(kInvalidValue) {} - - constexpr bool is_null() const { -- return base::ranges::any_of(kAllInvalidValues, [this](WrappedType value) { -+ return std::ranges::any_of(kAllInvalidValues, [this](WrappedType value) { - return this->value() == value; - }); - } -diff --git a/base/values.cc b/base/values.cc -index fde93d6aac615..f2d86f9d3771f 100644 ---- a/base/values.cc -+++ b/base/values.cc -@@ -4,6 +4,7 @@ - - #include "base/values.h" - -+#include - #include - #include - #include -@@ -22,7 +23,6 @@ - #include "base/logging.h" - #include "base/memory/ptr_util.h" - #include "base/notreached.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util.h" - #include "base/strings/utf_string_conversions.h" - #include "base/trace_event/base_tracing.h" -@@ -199,7 +199,7 @@ Value::Value(base::span value) - : data_(absl::in_place_type_t(), value.size()) { - // This is 100x faster than using the "range" constructor for a 512k blob: - // crbug.com/1343636 -- ranges::copy(value, absl::get(data_).data()); -+ std::ranges::copy(value, absl::get(data_).data()); - } - - Value::Value(BlobStorage&& value) noexcept : data_(std::move(value)) {} -@@ -938,7 +938,8 @@ void Value::Dict::WriteIntoTrace(perfetto::TracedValue context) const { - - bool operator==(const Value::Dict& lhs, const Value::Dict& rhs) { - auto deref_2nd = [](const auto& p) { return std::tie(p.first, *p.second); }; -- return ranges::equal(lhs.storage_, rhs.storage_, {}, deref_2nd, deref_2nd); -+ return std::ranges::equal(lhs.storage_, rhs.storage_, {}, deref_2nd, -+ deref_2nd); - } - - bool operator!=(const Value::Dict& lhs, const Value::Dict& rhs) { -@@ -947,8 +948,8 @@ bool operator!=(const Value::Dict& lhs, const Value::Dict& rhs) { - - bool operator<(const Value::Dict& lhs, const Value::Dict& rhs) { - auto deref_2nd = [](const auto& p) { return std::tie(p.first, *p.second); }; -- return ranges::lexicographical_compare(lhs.storage_, rhs.storage_, {}, -- deref_2nd, deref_2nd); -+ return std::ranges::lexicographical_compare(lhs.storage_, rhs.storage_, {}, -+ deref_2nd, deref_2nd); - } - - bool operator>(const Value::Dict& lhs, const Value::Dict& rhs) { -diff --git a/base/win/embedded_i18n/language_selector.cc b/base/win/embedded_i18n/language_selector.cc -index 282908b885902..7bc4305aadb4a 100644 ---- a/base/win/embedded_i18n/language_selector.cc -+++ b/base/win/embedded_i18n/language_selector.cc -@@ -15,7 +15,6 @@ - - #include "base/check_op.h" - #include "base/memory/raw_ptr.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util.h" - #include "base/strings/utf_string_conversions.h" - #include "base/win/i18n.h" -@@ -49,7 +48,7 @@ struct AvailableLanguageAliases { - bool IsArraySortedAndLowerCased(span languages_to_offset) { - return std::is_sorted(languages_to_offset.begin(), - languages_to_offset.end()) && -- base::ranges::all_of(languages_to_offset, [](const auto& lang) { -+ std::ranges::all_of(languages_to_offset, [](const auto& lang) { - auto language = AsStringPiece16(lang.first); - return ToLowerASCII(language) == language; - }); -diff --git a/base/win/sid.cc b/base/win/sid.cc -index 6b5d9b1e494b7..6a91e984f5161 100644 ---- a/base/win/sid.cc -+++ b/base/win/sid.cc -@@ -17,6 +17,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -24,7 +25,6 @@ - #include "base/check.h" - #include "base/no_destructor.h" - #include "base/rand_util.h" --#include "base/ranges/algorithm.h" - #include "base/strings/string_util_win.h" - #include "base/win/scoped_handle.h" - #include "base/win/scoped_localalloc.h" -@@ -258,23 +258,23 @@ std::optional> Sid::FromSddlStringVector( - std::vector Sid::FromNamedCapabilityVector( - const std::vector& capability_names) { - std::vector sids; -- ranges::transform(capability_names, std::back_inserter(sids), -- FromNamedCapability); -+ std::ranges::transform(capability_names, std::back_inserter(sids), -+ FromNamedCapability); - return sids; - } - - std::vector Sid::FromKnownCapabilityVector( - const std::vector& capabilities) { - std::vector sids; -- ranges::transform(capabilities, std::back_inserter(sids), -- FromKnownCapability); -+ std::ranges::transform(capabilities, std::back_inserter(sids), -+ FromKnownCapability); - return sids; - } - - std::vector Sid::FromKnownSidVector( - const std::vector& known_sids) { - std::vector sids; -- ranges::transform(known_sids, std::back_inserter(sids), FromKnownSid); -+ std::ranges::transform(known_sids, std::back_inserter(sids), FromKnownSid); - return sids; - } - -diff --git a/base/win/sid_unittest.cc b/base/win/sid_unittest.cc -index 6d89300d1dd6e..ab70d7c22900f 100644 ---- a/base/win/sid_unittest.cc -+++ b/base/win/sid_unittest.cc -@@ -15,9 +15,9 @@ - - #include - -+#include - #include - --#include "base/ranges/algorithm.h" - #include "base/win/atl.h" - #include "base/win/scoped_handle.h" - #include "base/win/scoped_localalloc.h" -@@ -60,10 +60,10 @@ bool EqualSid(const std::optional& sid, WELL_KNOWN_SID_TYPE known_sid) { - - bool TestSidVector(std::optional> sids, - const std::vector& sddl) { -- return sids && ranges::equal(*sids, sddl, -- [](const Sid& sid, const std::wstring& sddl) { -- return EqualSid(sid, sddl); -- }); -+ return sids && std::ranges::equal( -+ *sids, sddl, [](const Sid& sid, const std::wstring& sddl) { -+ return EqualSid(sid, sddl); -+ }); - } - - bool TestFromSddlStringVector(const std::vector sddl) { -@@ -309,8 +309,8 @@ TEST(SidTest, FromNamedCapabilityVector) { - L"registryRead", - L"lpacCryptoServices"}; - -- ASSERT_TRUE(ranges::equal(Sid::FromNamedCapabilityVector(capabilities), -- capabilities, EqualNamedCapSid)); -+ ASSERT_TRUE(std::ranges::equal(Sid::FromNamedCapabilityVector(capabilities), -+ capabilities, EqualNamedCapSid)); - EXPECT_EQ(Sid::FromNamedCapabilityVector({}).size(), 0U); - } - -diff --git a/base/win/vector.h b/base/win/vector.h -index 27c69cecc1fb3..7ec11dab458b6 100644 ---- a/base/win/vector.h -+++ b/base/win/vector.h -@@ -17,7 +17,6 @@ - #include "base/base_export.h" - #include "base/check_op.h" - #include "base/containers/flat_map.h" --#include "base/ranges/algorithm.h" - #include "base/win/winrt_foundation_helpers.h" - - namespace base { -@@ -254,7 +253,7 @@ class Vector - } - - IFACEMETHODIMP IndexOf(AbiT value, unsigned* index, boolean* found) override { -- auto iter = base::ranges::find_if(vector_, [&value](const StorageT& elem) { -+ auto iter = std::ranges::find_if(vector_, [&value](const StorageT& elem) { - return internal::IsEqual(elem, value); - }); - *index = iter != vector_.end() ? std::distance(vector_.begin(), iter) : 0; diff --git a/3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f.patch b/3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f.patch deleted file mode 100644 index 9564381..0000000 --- a/3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f.patch +++ /dev/null @@ -1,531 +0,0 @@ -From 3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f Mon Sep 17 00:00:00 2001 -From: Peter Kasting -Date: Wed, 29 Jan 2025 14:20:16 -0800 -Subject: [PATCH] Remove base/ranges/. - -Bug: 386918226 -Change-Id: If9ebb8ca5677985565f30df0aaf1ce4d6c91e347 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6215440 -Owners-Override: Lei Zhang -Commit-Queue: Peter Kasting -Reviewed-by: Lei Zhang -Cr-Commit-Position: refs/heads/main@{#1413176} - -diff --git a/PRESUBMIT.py b/PRESUBMIT.py -index 3110a7b2e4ac5..09249a70fa645 100644 ---- a/PRESUBMIT.py -+++ b/PRESUBMIT.py -@@ -873,7 +873,6 @@ _BANNED_CPP_FUNCTIONS: Sequence[BanRule] = ( - # migrated to the //base equivalent. - r'ash/ambient/model/ambient_topic_queue\.cc', - r'base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest\.cc', -- r'base/ranges/algorithm_unittest\.cc', - r'base/test/launcher/test_launcher\.cc', - r'cc/metrics/video_playback_roughness_reporter_unittest\.cc', - r'chrome/browser/apps/app_service/metrics/website_metrics\.cc', -@@ -917,8 +916,7 @@ _BANNED_CPP_FUNCTIONS: Sequence[BanRule] = ( - BanRule( - r'/\babsl::c_', - ( -- 'Abseil container utilities are banned. Use base/ranges/algorithm.h ', -- 'instead.', -+ 'Abseil container utilities are banned. Use std::ranges:: instead.', - ), - True, - [_THIRD_PARTY_EXCEPT_BLINK], # Not an error in third_party folders. -diff --git a/base/BUILD.gn b/base/BUILD.gn -index c09afe031ba5c..3934ff75fa9f0 100644 ---- a/base/BUILD.gn -+++ b/base/BUILD.gn -@@ -562,10 +562,6 @@ component("base") { - "profiler/unwinder.h", - "rand_util.cc", - "rand_util.h", -- "ranges/algorithm.h", -- "ranges/from_range.h", -- "ranges/functional.h", -- "ranges/ranges.h", - "run_loop.cc", - "run_loop.h", - "sampling_heap_profiler/lock_free_address_hash_set.cc", -@@ -886,6 +882,7 @@ component("base") { - "traits_bag.h", - "tuple.h", - "types/always_false.h", -+ "types/cxx23_from_range.h", - "types/cxx23_is_scoped_enum.h", - "types/cxx23_to_underlying.h", - "types/expected.h", -@@ -3386,7 +3383,6 @@ test("base_unittests") { - "profiler/stack_sampling_profiler_unittest.cc", - "profiler/thread_group_profiler_unittest.cc", - "rand_util_unittest.cc", -- "ranges/functional_unittest.cc", - "run_loop_unittest.cc", - "safe_numerics_unittest.cc", - "sampling_heap_profiler/lock_free_address_hash_set_unittest.cc", -diff --git a/base/containers/circular_deque.h b/base/containers/circular_deque.h -index db427316ff85c..7e8ff24b9ee83 100644 ---- a/base/containers/circular_deque.h -+++ b/base/containers/circular_deque.h -@@ -17,7 +17,7 @@ - #include "base/memory/raw_ptr_exclusion.h" - #include "base/numerics/checked_math.h" - #include "base/numerics/safe_conversions.h" --#include "base/ranges/from_range.h" -+#include "base/types/cxx23_from_range.h" - - #if DCHECK_IS_ON() - #include -diff --git a/base/containers/intrusive_heap.h b/base/containers/intrusive_heap.h -index 3eef33b334fbe..70ecf19d916ac 100644 ---- a/base/containers/intrusive_heap.h -+++ b/base/containers/intrusive_heap.h -@@ -144,7 +144,7 @@ - #include "base/check_op.h" - #include "base/compiler_specific.h" - #include "base/memory/ptr_util.h" --#include "base/ranges/from_range.h" -+#include "base/types/cxx23_from_range.h" - #include "third_party/abseil-cpp/absl/container/inlined_vector.h" - - namespace base { -diff --git a/base/ranges/OWNERS b/base/ranges/OWNERS -deleted file mode 100644 -index bf426d601e02e..0000000000000 ---- a/base/ranges/OWNERS -+++ /dev/null -@@ -1 +0,0 @@ --pkasting@chromium.org -diff --git a/base/ranges/README.md b/base/ranges/README.md -deleted file mode 100644 -index c9a72c4dd678c..0000000000000 ---- a/base/ranges/README.md -+++ /dev/null -@@ -1,144 +0,0 @@ --# `base::ranges` -- --This directory aims to implement a C++14 version of the new `std::ranges` --algorithms that were introduced in C++20. These implementations are added to the --`::base::ranges` namespace, and callers can access them by including --[`base/ranges/algorithm.h`](https://source.chromium.org/chromium/chromium/src/+/main:base/ranges/algorithm.h). -- --## Similarities with C++20: -- --### Automatically deducing `begin()` and `end()` --As probably one of the most important changes for readability and usability, all --algorithms in `base::ranges` have overloads for ranges of elements, which allow --callers to no longer specify `begin()` and `end()` iterators themselves. -- --Before: --```c++ --bool HasEvens(const std::vector& vec) { -- return std::any_of(vec.begin(), vec.end(), [](int i) { return i % 2 == 0; }); --} --``` -- --After: --```c++ --bool HasEvens(const std::vector& vec) { -- return base::ranges::any_of(vec, [](int i) { return i % 2 == 0; }); --} --``` -- --Furthermore, these overloads also support binding to temporaries, so that --applying algorithms to return values is easier: -- --```c++ --std::vector GetNums(); --``` -- --Before: -- --```c++ --bool HasEvens() { -- std::vector nums = GetNums(); -- return std::any_of(nums.begin(), nums.end(), -- [](int i) { return i % 2 == 0; }); --} --``` -- --After: --```c++ --bool HasEvens() { -- return base::ranges::any_of(GetNums(), [](int i) { return i % 2 == 0; }); --} --``` -- --### Support for Projections --In addition to supporting automatically deducing the `begin()` and `end()` --iterator for ranges, the `base::ranges::` algorithms also support projections, --that can be applied to arguments prior to passing it to supplied transformations --or predicates. This is especially useful when ordering a collection of classes --by a specific data member of the class. Example: -- --Before: --```cpp --std::sort(suggestions->begin(), suggestions->end(), -- [](const autofill::Suggestion& a, const autofill::Suggestion& b) { -- return a.match < b.match; -- }); --``` -- --After: --```cpp --base::ranges::sort(*suggestions, /*comp=*/{}, &autofill::Suggestion::match); --``` -- --Anything that is callable can be used as a projection. This includes --`FunctionObjects` like function pointers or functors, but also pointers to --member function and pointers to data members, as shown above. When not specified --a projection defaults to `base::ranges::identity`, which simply perfectly --forwards its argument. -- --Projections are supported in both range and iterator-pair overloads of the --`base::ranges::` algorithms, for example `base::ranges::all_of` has the --following signatures: -- --```cpp --template --bool all_of(InputIterator first, InputIterator last, Pred pred, Proj proj = {}); -- --template --bool all_of(Range&& range, Pred pred, Proj proj = {}); --``` -- --## Differences from C++20: --To simplify the implementation of the `base::ranges::` algorithms, they dispatch --to the `std::` algorithms found in C++14. This leads to the following list of --differences from C++20. Since most of these differences are differences in the --library and not in the language, they could be addressed in the future by adding --corresponding implementations. -- --### Lack of Constraints --Due to the lack of support for concepts in the language, the algorithms in --`base::ranges` do not have the constraints that are present on the algorithms in --`std::ranges`. Instead, they support any type, much like C++14's `std::` --algorithms. In the future this might be addressed by adding corresponding --constraints via SFINAE, should the need arise. -- --### Lack of Range Primitives --Due to C++14's lack of `std::ranges` concepts like sentinels and other range --primitives, algorithms taking a `[first, last)` pair rather than a complete --range, do not support different types for `first` and `last`. Since they rely on --C++14's implementation, the type must be the same. This could be addressed in --the future by implementing support for sentinel types ourselves. -- --### Lack of `constexpr` --The `base::ranges` algorithms can only be used in a `constexpr` context when --they call underlying `std::` algorithms that are themselves `constexpr`. Before --C++20, only `std::min`, `std::max` and `std::minmax` are annotated --appropriately, so code like `constexpr bool foo = base::ranges::any_of(...);` --will fail because the compiler will not find a `constexpr std::any_of`. This --could be addressed by either upgrading Chromium's STL to C++20, or implementing --`constexpr` versions of some of these algorithms ourselves. -- --### Lack of post C++14 algorithms --Since most algorithms in `base::ranges` dispatch to their C++14 equivalent, some --`std::` algorithms that are not present in C++14 have no implementation in --`base::ranges`. This list of algorithms includes the following: -- --- [`std::sample`](https://en.cppreference.com/w/cpp/algorithm/sample) (added in C++17) -- --### Return Types --Some of the algorithms in `std::ranges::` have different return types than their --equivalent in `std::`. For example, while `std::for_each` returns the passed-in --`Function`, `std::ranges::for_each` returns a `std::ranges::for_each_result`, --consisting of the `last` iterator and the function. -- --In the cases where the return type differs, `base::ranges::` algorithms will --continue to return the old return type. -- --### No blocking of ADL --The algorithms defined in `std::ranges` are not found by ADL, and inhibit ADL --when found by [unqualified name lookup][1]. This is done to be able to enforce --the constraints specified by those algorithms and commonly implemented by using --function objects instead of regular functions. Since we don't support --constrained algorithms yet, we don't implement the blocking of ADL either. -- --[1]: https://wg21.link/algorithms.requirements#2 -diff --git a/base/ranges/algorithm.h b/base/ranges/algorithm.h -deleted file mode 100644 -index 86d2ab45a0bdd..0000000000000 ---- a/base/ranges/algorithm.h -+++ /dev/null -@@ -1,101 +0,0 @@ --// Copyright 2020 The Chromium Authors --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#ifndef BASE_RANGES_ALGORITHM_H_ --#define BASE_RANGES_ALGORITHM_H_ -- --#include -- --// TODO(crbug.com/40240443): Remove this and use std::ranges:: directly. -- --namespace base::ranges { -- --using std::ranges::adjacent_find; --using std::ranges::all_of; --using std::ranges::any_of; --using std::ranges::binary_search; --using std::ranges::clamp; --using std::ranges::copy; --using std::ranges::copy_backward; --using std::ranges::copy_if; --using std::ranges::copy_n; --using std::ranges::count; --using std::ranges::count_if; --using std::ranges::equal; --using std::ranges::equal_range; --using std::ranges::fill; --using std::ranges::fill_n; --using std::ranges::find; --using std::ranges::find_end; --using std::ranges::find_first_of; --using std::ranges::find_if; --using std::ranges::find_if_not; --using std::ranges::for_each; --using std::ranges::for_each_n; --using std::ranges::generate; --using std::ranges::generate_n; --using std::ranges::includes; --using std::ranges::inplace_merge; --using std::ranges::is_heap; --using std::ranges::is_heap_until; --using std::ranges::is_partitioned; --using std::ranges::is_permutation; --using std::ranges::is_sorted; --using std::ranges::is_sorted_until; --using std::ranges::lexicographical_compare; --using std::ranges::lower_bound; --using std::ranges::make_heap; --using std::ranges::max; --using std::ranges::max_element; --using std::ranges::merge; --using std::ranges::min; --using std::ranges::min_element; --using std::ranges::minmax; --using std::ranges::minmax_element; --using std::ranges::mismatch; --using std::ranges::move; --using std::ranges::move_backward; --using std::ranges::next_permutation; --using std::ranges::none_of; --using std::ranges::nth_element; --using std::ranges::partial_sort; --using std::ranges::partial_sort_copy; --using std::ranges::partition; --using std::ranges::partition_copy; --using std::ranges::partition_point; --using std::ranges::pop_heap; --using std::ranges::prev_permutation; --using std::ranges::push_heap; --using std::ranges::remove; --using std::ranges::remove_copy; --using std::ranges::remove_copy_if; --using std::ranges::remove_if; --using std::ranges::replace; --using std::ranges::replace_copy; --using std::ranges::replace_copy_if; --using std::ranges::replace_if; --using std::ranges::reverse; --using std::ranges::reverse_copy; --using std::ranges::rotate; --using std::ranges::rotate_copy; --using std::ranges::search; --using std::ranges::search_n; --using std::ranges::set_difference; --using std::ranges::set_intersection; --using std::ranges::set_symmetric_difference; --using std::ranges::set_union; --using std::ranges::shuffle; --using std::ranges::sort; --using std::ranges::sort_heap; --using std::ranges::stable_partition; --using std::ranges::stable_sort; --using std::ranges::swap_ranges; --using std::ranges::transform; --using std::ranges::unique; --using std::ranges::unique_copy; --using std::ranges::upper_bound; -- --} // namespace base::ranges -- --#endif // BASE_RANGES_ALGORITHM_H_ -diff --git a/base/ranges/functional.h b/base/ranges/functional.h -deleted file mode 100644 -index 29ac1237b50c3..0000000000000 ---- a/base/ranges/functional.h -+++ /dev/null -@@ -1,21 +0,0 @@ --// Copyright 2020 The Chromium Authors --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#ifndef BASE_RANGES_FUNCTIONAL_H_ --#define BASE_RANGES_FUNCTIONAL_H_ -- --#include -- --namespace base::ranges { -- --using equal_to = std::equal_to<>; --using not_equal_to = std::not_equal_to<>; --using greater = std::greater<>; --using less = std::less<>; --using greater_equal = std::greater_equal<>; --using less_equal = std::less_equal<>; -- --} // namespace base::ranges -- --#endif // BASE_RANGES_FUNCTIONAL_H_ -diff --git a/base/ranges/functional_unittest.cc b/base/ranges/functional_unittest.cc -deleted file mode 100644 -index 2ee7718990354..0000000000000 ---- a/base/ranges/functional_unittest.cc -+++ /dev/null -@@ -1,25 +0,0 @@ --// Copyright 2020 The Chromium Authors --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#include "base/ranges/functional.h" -- --#include "testing/gtest/include/gtest/gtest.h" -- --namespace base { -- --TEST(RangesTest, EqualTo) { -- ranges::equal_to eq; -- EXPECT_TRUE(eq(0, 0)); -- EXPECT_FALSE(eq(0, 1)); -- EXPECT_FALSE(eq(1, 0)); --} -- --TEST(RangesTest, Less) { -- ranges::less lt; -- EXPECT_FALSE(lt(0, 0)); -- EXPECT_TRUE(lt(0, 1)); -- EXPECT_FALSE(lt(1, 0)); --} -- --} // namespace base -diff --git a/base/ranges/ranges.h b/base/ranges/ranges.h -deleted file mode 100644 -index dfe754837aed0..0000000000000 ---- a/base/ranges/ranges.h -+++ /dev/null -@@ -1,19 +0,0 @@ --// Copyright 2020 The Chromium Authors --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#ifndef BASE_RANGES_RANGES_H_ --#define BASE_RANGES_RANGES_H_ -- --#include -- --namespace base::ranges { -- --template --using iterator_t = std::ranges::iterator_t; --template --using range_value_t = std::ranges::range_value_t; -- --} // namespace base::ranges -- --#endif // BASE_RANGES_RANGES_H_ -diff --git a/base/ranges/from_range.h b/base/types/cxx23_from_range.h -similarity index 83% -rename from base/ranges/from_range.h -rename to base/types/cxx23_from_range.h -index a0fca0a34089e..b7a0a9dc0d1d2 100644 ---- a/base/ranges/from_range.h -+++ b/base/types/cxx23_from_range.h -@@ -2,8 +2,8 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - --#ifndef BASE_RANGES_FROM_RANGE_H_ --#define BASE_RANGES_FROM_RANGE_H_ -+#ifndef BASE_TYPES_CXX23_FROM_RANGE_H_ -+#define BASE_TYPES_CXX23_FROM_RANGE_H_ - - namespace base { - -@@ -22,4 +22,4 @@ constexpr inline from_range_t from_range; - - } // namespace base - --#endif // BASE_RANGES_FROM_RANGE_H_ -+#endif // BASE_TYPES_CXX23_FROM_RANGE_H_ -diff --git a/chrome/browser/ash/kerberos/kerberos_credentials_manager.cc b/chrome/browser/ash/kerberos/kerberos_credentials_manager.cc -index fcaa188bb8429..8cd3c6ea8513f 100644 ---- a/chrome/browser/ash/kerberos/kerberos_credentials_manager.cc -+++ b/chrome/browser/ash/kerberos/kerberos_credentials_manager.cc -@@ -4,13 +4,13 @@ - - #include "chrome/browser/ash/kerberos/kerberos_credentials_manager.h" - -+#include - #include - - #include "ash/webui/settings/public/constants/routes.mojom.h" - #include "base/containers/flat_map.h" - #include "base/functional/bind.h" - #include "base/memory/raw_ptr.h" --#include "base/ranges/algorithm.h" - #include "base/strings/escape.h" - #include "base/strings/string_split.h" - #include "base/strings/string_util.h" -diff --git a/content/browser/renderer_host/frame_tree.cc b/content/browser/renderer_host/frame_tree.cc -index ecfd033962a28..0a88a165f0a8c 100644 ---- a/content/browser/renderer_host/frame_tree.cc -+++ b/content/browser/renderer_host/frame_tree.cc -@@ -20,9 +20,9 @@ - #include "base/memory/raw_ptr.h" - #include "base/memory/safe_ref.h" - #include "base/not_fatal_until.h" --#include "base/ranges/from_range.h" - #include "base/trace_event/optional_trace_event.h" - #include "base/trace_event/typed_macros.h" -+#include "base/types/cxx23_from_range.h" - #include "base/unguessable_token.h" - #include "content/browser/renderer_host/batched_proxy_ipc_sender.h" - #include "content/browser/renderer_host/navigation_controller_impl.h" -diff --git a/styleguide/c++/c++-features.md b/styleguide/c++/c++-features.md -index bbf0f1780b48c..81fa4680f7201 100644 ---- a/styleguide/c++/c++-features.md -+++ b/styleguide/c++/c++-features.md -@@ -1113,8 +1113,6 @@ iterator-sentinel pair or a single range argument. - - **Notes:** - *** promo --Supersedes `//base`'s backports in `//base/ranges/algorithm.h`. -- - [Discussion thread](https://groups.google.com/a/chromium.org/g/cxx/c/ZnIbkfJ0Glw) - *** - -@@ -1922,7 +1920,7 @@ standard library. - - **Notes:** - *** promo --Overlaps with `base/ranges/algorithm.h`. -+Overlaps with `std::ranges::`. - *** - - ### FixedArray [banned] -diff --git a/third_party/googletest/custom/gtest/internal/custom/stack_trace_getter.cc b/third_party/googletest/custom/gtest/internal/custom/stack_trace_getter.cc -index 58f6f81ab66d5..289739be981c2 100644 ---- a/third_party/googletest/custom/gtest/internal/custom/stack_trace_getter.cc -+++ b/third_party/googletest/custom/gtest/internal/custom/stack_trace_getter.cc -@@ -9,7 +9,6 @@ - - #include "base/containers/adapters.h" - #include "base/containers/span.h" --#include "base/ranges/algorithm.h" - - std::string StackTraceGetter::CurrentStackTrace(int max_depth, int skip_count) { - base::debug::StackTrace stack_trace; diff --git a/INSTALL.sh b/INSTALL.sh index e2332eb..25b31d7 100644 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -30,8 +30,8 @@ PRODUCTURL="https://www.chromium.org/Home" DEVELOPER_NAME="The Chromium Authors" BUGTRACKERURL="https://www.chromium.org/for-testers/bug-reporting-guidelines" HELPURL="https://chromium.googlesource.com/chromium/src/+/main/docs/linux/debugging.md" -MENUNAME="Chromium Web Browser (dev)" -CHANNEL="dev" +MENUNAME="Chromium Web Browser (beta)" +CHANNEL="beta" INSTALLDIR="${LIBDIR}/chromium" install -m 755 -d \ diff --git a/chromium-134.0.6988.2.tar.xz b/chromium-134.0.6988.2.tar.xz deleted file mode 100644 index 644f741..0000000 --- a/chromium-134.0.6988.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e1e30326015da99a642b32a94725484e60f0215a4817d8fec0cb7d2005a4186 -size 8752495156 diff --git a/chromium.changes b/chromium.changes index 3f6ed51..939e3cb 100644 --- a/chromium.changes +++ b/chromium.changes @@ -1,8 +1,8 @@ ------------------------------------------------------------------- -Fri Jan 31 16:43:21 CET 2025 - ro@suse.de +Thu Feb 6 13:18:26 CET 2025 - ro@suse.de -- Chromium 134.0.6988.2 - (dev release 2025-01-31) +- Chromium 134.0.6998.3 + (beta release 2025-02-05) - modified patches: fix_building_widevinecdm_with_chromium.patch (do not define WIDEVINE_CDM_VERSION_STRING, gone upstream) @@ -15,14 +15,21 @@ Fri Jan 31 16:43:21 CET 2025 - ro@suse.de pthreadpool-revert-stdatomic-prep.patch pthreadpool-revert-stdatomic.patch (revert change to pthreadpool requiring std=c++23) - 3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f.patch (revert) - 025a94257380eadfad2d705129e5863fca0bf89e.patch (revert) - add to keeplibs: third_party/search_engines_data v8/third_party/rapidhash-v8 - drop from keeplibs: third_party/libavif (gone) (FIXME cleanup) +------------------------------------------------------------------- +Wed Feb 5 10:36:43 CET 2025 - ro@suse.de + +- Chromium 133.0.6943.53 + (stable released 2024-02-04) (bsc#1236806) + * CVE-2025-0444: Use after free in Skia + * CVE-2025-0445: Use after free in V8 + * CVE-2025-0451: Inappropriate implementation in Extensions API + ------------------------------------------------------------------- Thu Jan 30 18:17:42 CET 2025 - ro@suse.de diff --git a/chromium.spec b/chromium.spec index 6a5e883..4cd050a 100644 --- a/chromium.spec +++ b/chromium.spec @@ -102,13 +102,13 @@ # Package names %if %{with is_beta} %define chromedriver_name %{name}-chromedriver -%define n_suffix -dev +%define n_suffix -beta %else %define chromedriver_name chromedriver %define n_suffix %{nil} %endif Name: chromium%{n_suffix} -Version: 134.0.6988.2 +Version: 134.0.6988.3 Release: 0 Summary: Google's open source browser project License: BSD-3-Clause AND LGPL-2.1-or-later @@ -175,8 +175,6 @@ Patch1030: chromium-134-revert-rust-adler2.patch # patch where llvm < 20 Patch1040: pthreadpool-revert-stdatomic-prep.patch Patch1041: pthreadpool-revert-stdatomic.patch -Patch1050: 3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f.patch -Patch1051: 025a94257380eadfad2d705129e5863fca0bf89e.patch # end conditionally applied patches BuildRequires: SDL-devel BuildRequires: bison