0

[cleanup] Replace base::ranges with std::ranges: services/

Done entirely with `git grep` and `sed` + `git cl format`, no
hand-editing.

Bug: 386918226
Change-Id: I81f5c7da2f7ff208aee257190ac82e0734cce819
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6201962
Owners-Override: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1411642}
This commit is contained in:
Peter Kasting
2025-01-27 08:22:38 -08:00
committed by Chromium LUCI CQ
parent 2eb886d873
commit f9d73bf132
104 changed files with 344 additions and 338 deletions
services
accessibility
audio
cert_verifier
data_decoder
device
image_annotation
media_session
network
preferences
proxy_resolver
screen_ai
service_manager
tracing
video_capture
webnn

@ -4,6 +4,7 @@
#include "services/tracing/perfetto/consumer_host.h"
#include <algorithm>
#include <cstring>
#include <set>
#include <string>
@ -14,7 +15,6 @@
#include "base/containers/span.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@ -271,7 +271,7 @@ void ConsumerHost::TracingSession::OnPerfettoEvents(
// Data sources are first reported as being stopped before starting, so once
// all the data sources we know about have started we can declare tracing
// begun.
bool all_data_sources_started = base::ranges::all_of(
bool all_data_sources_started = std::ranges::all_of(
data_source_states_,
[](std::pair<DataSourceHandle, bool> state) { return state.second; });
if (!all_data_sources_started)

@ -11,7 +11,6 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/ptr_util.h"
#include "base/ranges/algorithm.h"
#include "components/tracing/common/tracing_switches.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/perfetto/include/perfetto/tracing/core/trace_config.h"
@ -167,7 +166,7 @@ TEST_F(TraceStartupConfigTest, ContentWithAbsoluteResultFilePath) {
ASSERT_TRUE(result_file_path.IsAbsolute());
std::string result_file_path_str = result_file_path.AsUTF8Unsafe();
auto it = base::ranges::find(result_file_path_str, '\\');
auto it = std::ranges::find(result_file_path_str, '\\');
while (it != result_file_path_str.end()) {
auto it2 = result_file_path_str.insert(it, '\\');
it = std::find(it2 + 2, result_file_path_str.end(), '\\');