0

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

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

Bug: 386918226
Change-Id: I7377af2f9c3758c68a249b421d98bd3fd5c2c1fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6201377
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1411730}
This commit is contained in:
Peter Kasting
2025-01-27 10:38:22 -08:00
committed by Chromium LUCI CQ
parent c97fafc319
commit ccea09835f
580 changed files with 1960 additions and 1965 deletions
components
account_manager_core
affiliations
aggregation_service
allocation_recorder
android_autofill
app_restore
attribution_reporting
autofill
content
core
browser
autofill_merge_unittest.cc
crowdsourcing
data_manager
data_model
data_quality
field_type_utils.cc
filling
form_import
form_parsing
form_processing
form_structure.ccform_structure_rationalization_engine_unittest.ccform_structure_rationalizer.ccform_structure_sectioning_util.cc
foundations
geo
heuristic_classification_unittests.cc
integrators
logging
manual_testing_import.cc
metrics
ml_model
payments
strike_databases
studies
suggestions
test_utils
ui
webdata
common
ios
autofill_ai
base32
bookmarks
browser_sync
browser_ui
site_settings
browsing_data
browsing_topics
cast_receiver
cast_streaming
client_update_protocol
commerce
component_updater
content_settings
continuous_search
crash
custom_handlers
data_sharing
desks_storage
device_event_log
discardable_memory
dom_distiller
download
drive
enterprise
exo
facilitated_payments
favicon
favicon_base
feed
feedback
gcm_driver
global_media_controls
history
history_clusters
history_embeddings
infobars
input
js_injection
keyed_service
language
lookalikes
media_effects
media_message_center
media_router
metrics
mirroring
no_state_prefetch
ntp_tiles
offline_items_collection
offline_pages
omnibox
optimization_guide
origin_trials
os_crypt
page_content_annotations
page_load_metrics
password_manager
content
core
browser
affiliation
credential_manager_impl_unittest.cccredential_manager_pending_request_task.ccfake_form_fetcher.cc
features
field_info_manager.cc
form_parsing
generation
http_password_store_migrator_unittest.cc
import
leak_detection
leak_detection_delegate_helper.ccleak_detection_dialog_utils_unittest.ccpassword_autofill_manager.ccpassword_credential_filler_impl_unittest.ccpassword_form.ccpassword_form_cache_impl.ccpassword_form_filling_unittest.ccpassword_form_manager.ccpassword_form_metrics_recorder.ccpassword_generation_manager.ccpassword_manager.ccpassword_manager_test_utils.ccpassword_manager_util.ccpassword_manager_util_unittest.ccpassword_manual_fallback_flow.ccpassword_reuse_detector_impl.ccpassword_reuse_detector_impl_unittest.ccpassword_save_manager_impl.cc
password_store
password_suggestion_generator.cc
sharing
store_metrics_reporter.cc
sync
ui
votes_uploader.cc
common
ios
payments
pdf
performance_manager
permissions
plus_addresses
policy
power_bookmarks
prefs
privacy_sandbox
query_parser
remote_cocoa
safe_browsing
safe_search_api
saved_tab_groups
search_engines
security_interstitials
segmentation_platform
services
sessions
shared_highlighting
signin
spellcheck
subresource_filter
supervised_user
sync
sync_bookmarks
sync_device_info
sync_sessions
tracing
translate
trusted_vault
ui_devtools
ukm
undo
unexportable_keys
unified_consent
update_client
url_formatter
url_matcher
url_pattern
url_pattern_index
url_rewrite
user_education
user_manager
user_notes
variations
visited_url_ranking
viz
web_modal
web_package
webauthn
webcrypto
webrtc
zucchini

@ -4,13 +4,13 @@
#include "components/sessions/core/command_storage_manager.h"
#include <algorithm>
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/scoped_refptr.h"
#include "base/ranges/algorithm.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
@ -99,8 +99,8 @@ void CommandStorageManager::AppendRebuildCommands(
}
void CommandStorageManager::EraseCommand(SessionCommand* old_command) {
auto it = base::ranges::find(pending_commands_, old_command,
&std::unique_ptr<SessionCommand>::get);
auto it = std::ranges::find(pending_commands_, old_command,
&std::unique_ptr<SessionCommand>::get);
CHECK(it != pending_commands_.end());
pending_commands_.erase(it);
DCHECK_GT(commands_since_reset_, 0);
@ -110,8 +110,8 @@ void CommandStorageManager::EraseCommand(SessionCommand* old_command) {
void CommandStorageManager::SwapCommand(
SessionCommand* old_command,
std::unique_ptr<SessionCommand> new_command) {
auto it = base::ranges::find(pending_commands_, old_command,
&std::unique_ptr<SessionCommand>::get);
auto it = std::ranges::find(pending_commands_, old_command,
&std::unique_ptr<SessionCommand>::get);
CHECK(it != pending_commands_.end());
*it = std::move(new_command);
}