[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:

committed by
Chromium LUCI CQ

parent
c97fafc319
commit
ccea09835f
components
account_manager_core
affiliations
core
aggregation_service
allocation_recorder
android_autofill
browser
app_restore
attribution_reporting
aggregatable_debug_reporting_config.ccaggregatable_named_budget_defs.ccaggregatable_values.ccaggregation_keys.ccattribution_scopes_set.ccdestination_set.ccevent_report_windows.ccfilters.ccparsing_utils.ccprivacy_math.cctest_utils.cctrigger_config.cc
autofill
content
renderer
core
browser
autofill_merge_unittest.cc
crowdsourcing
data_manager
addresses
payments
data_model
autofill_i18n_api_unittest.ccautofill_offer_data.ccautofill_profile.ccautofill_profile_comparator.ccautofill_profile_unittest.ccautofill_structured_address_component.ccphone_number_unittest.cc
data_quality
field_type_utils.ccfilling
form_import
form_parsing
form_processing
form_structure.ccform_structure_rationalization_engine_unittest.ccform_structure_rationalizer.ccform_structure_sectioning_util.ccfoundations
autofill_driver_router.ccautofill_manager.ccautofill_manager_unittest.ccbrowser_autofill_manager.ccbrowser_autofill_manager_unittest.ccform_forest.ccform_forest_unittest.ccform_forest_util_inl.htest_autofill_manager_waiter.cc
geo
heuristic_classification_unittests.ccintegrators
logging
manual_testing_import.ccmetrics
autofill_metrics.ccautofill_metrics_unittest.cc
form_events
form_interactions_ukm_logger_unittest.ccplaceholder_metrics.ccquality_metrics.ccquality_metrics_filling.ccstored_profile_metrics.ccsuggestions_list_metrics.ccml_model
field_classification_model_encoder.ccfield_classification_model_executor.ccfield_classification_model_handler.cc
payments
autofill_offer_manager.cccredit_card_access_manager.cccredit_card_otp_authenticator_unittest.cccredit_card_risk_based_authenticator_unittest.ccfull_card_request_unittest.cciban_save_manager.cc
payments_requests
payments_util.ccstrike_databases
studies
suggestions
test_utils
ui
webdata
common
ios
autofill_ai
core
browser
suggestion
base32
bookmarks
browser
managed
browser_sync
browser_ui
site_settings
android
browsing_data
content
core
browsing_topics
annotator_impl.ccbrowsing_topics_calculator.ccbrowsing_topics_service_impl.ccbrowsing_topics_state_unittest.cc
common
util.cccast_receiver
cast_streaming
client_update_protocol
commerce
core
product_specifications
component_updater
content_settings
core
continuous_search
common
crash
core
custom_handlers
data_sharing
desks_storage
core
device_event_log
discardable_memory
dom_distiller
download
internal
background_service
drive
enterprise
browser
controller
connectors
core
idle
exo
client_controlled_shell_surface.cckeyboard.ccshell_surface.ccsurface.ccsurface_tree_host.cctouch.cc
wayland
facilitated_payments
core
browser
favicon
favicon_base
feed
feedback
gcm_driver
instance_id
global_media_controls
public
history
core
history_clusters
core
history_embeddings
infobars
input
js_injection
keyed_service
language
lookalikes
media_effects
media_message_center
media_router
metrics
call_stacks
mirroring
service
no_state_prefetch
ntp_tiles
offline_items_collection
offline_pages
core
background
omnibox
browser
actions
autocomplete_controller.ccautocomplete_controller_metrics_unittest.ccautocomplete_grouper_groups.ccautocomplete_grouper_sections.ccautocomplete_grouper_sections_unittest.ccautocomplete_match.ccautocomplete_match.hautocomplete_provider.ccautocomplete_provider_unittest.ccautocomplete_result.ccautocomplete_result_unittest.ccbase_search_provider.cccalculator_provider.ccdocument_provider.ccdocument_provider_unittest.ccfeatured_search_provider.cchistory_fuzzy_provider.cchistory_fuzzy_provider_unittest.cchistory_quick_provider_unittest.cchistory_url_provider.ccin_memory_url_index_types.ccin_memory_url_index_unittest.ccopen_tab_provider.ccscored_history_match.ccscored_history_match_unittest.ccsearch_provider.ccsearch_suggestion_parser.ccshortcuts_backend.ccshortcuts_backend_unittest.ccshortcuts_provider.ccshortcuts_provider_test_util.cctitled_url_match_utils_unittest.ccurl_index_private_data.cczero_suggest_cache_service.ccoptimization_guide
origin_trials
os_crypt
async
page_content_annotations
page_load_metrics
browser
password_manager
content
core
browser
affiliation
credential_manager_impl_unittest.cccredential_manager_pending_request_task.ccfake_form_fetcher.ccfeatures
field_info_manager.ccform_parsing
generation
http_password_store_migrator_unittest.ccimport
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.ccpassword_store
fake_password_store_backend.ccget_logins_with_affiliations_request_handler.ccpassword_store.ccpassword_store_built_in_backend.ccpassword_store_util.cc
password_suggestion_generator.ccsharing
outgoing_password_sharing_invitation_sync_bridge.ccpassword_receiver_service_impl.ccpassword_sender_service_impl.cc
store_metrics_reporter.ccsync
ui
affiliated_group.ccbulk_leak_check_service_adapter_unittest.ccinsecure_credentials_manager.ccpasswords_grouper.ccpost_save_compromised_helper.ccreuse_check_utility.ccreuse_check_utility_unittest.ccsaved_passwords_presenter.cc
votes_uploader.cccommon
ios
payments
content
manifest_verifier.ccpayment_request.ccpayment_request_spec.ccpayment_request_state.ccsecure_payment_confirmation_app_factory.cc
core
pdf
renderer
performance_manager
permissions
bluetooth_chooser_controller.ccbluetooth_scanning_prompt_controller.ccpermission_actions_history.ccpermission_actions_history_unittest.ccpermission_hats_trigger_helper.ccpermission_manager.ccpermission_request_manager.ccpermission_request_queue.ccpermission_util.ccrequest_type.cc
test
plus_addresses
policy
core
test_support
power_bookmarks
prefs
privacy_sandbox
query_parser
remote_cocoa
safe_browsing
content
core
safe_search_api
saved_tab_groups
internal
saved_tab_group_sync_bridge.ccsaved_tab_group_sync_bridge_unittest.ccshared_tab_group_data_sync_bridge.ccshared_tab_group_data_sync_bridge_unittest.cctab_group_sync_service_unittest.cc
public
search_engines
android
default_search_manager_unittest.ccenterprise
reconciling_template_url_data_holder.ccsearch_host_to_urls_map.cctemplate_url.cctemplate_url_fetcher.cctemplate_url_prepopulate_data.cctemplate_url_service.ccutil.ccsecurity_interstitials
segmentation_platform
embedder
internal
metadata
services
app_service
font_data
paint_preview_compositor
print_compositor
storage
dom_storage
indexed_db
public
cpp
buckets
sessions
shared_highlighting
core
signin
core
browser
internal
spellcheck
subresource_filter
supervised_user
sync
base
engine
model
test
sync_bookmarks
bookmark_model_merger.ccbookmark_model_merger_unittest.ccbookmark_remote_updates_handler.cclocal_bookmark_to_account_merger.ccsynced_bookmark_tracker.cc
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
common
tutorial
user_manager
user_notes
variations
active_field_trials.cc
service
study_filtering.ccvariations_test_utils.ccvariations_test_utils_unittest.ccvisited_url_ranking
viz
client
common
frame_sinks
host
service
web_modal
web_package
signed_web_bundles
ecdsa_p256_public_key.ccecdsa_p256_sha256_signature.cced25519_public_key.cced25519_signature.cced25519_signature_unittest.ccidentity_validator.ccsigned_web_bundle_id.ccsigned_web_bundle_id_unittest.ccsigned_web_bundle_signature_stack.cc
test_support
signed_web_bundles
webauthn
core
json
webcrypto
algorithms
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user