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/account_manager_core/account_manager_facade_impl.h"
#include <algorithm>
#include <limits>
#include <memory>
#include "base/functional/callback_forward.h"
#include "base/functional/callback_helpers.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/scoped_observation.h"
#include "base/test/bind.h"
@ -151,7 +151,7 @@ class FakeAccountManager : public crosapi::mojom::AccountManager {
void GetAccounts(GetAccountsCallback callback) override {
std::vector<crosapi::mojom::AccountPtr> mojo_accounts;
base::ranges::transform(accounts_, std::back_inserter(mojo_accounts),
std::ranges::transform(accounts_, std::back_inserter(mojo_accounts),
&ToMojoAccount);
std::move(callback).Run(std::move(mojo_accounts));
}

@ -4,6 +4,7 @@
#include "components/account_manager_core/chromeos/account_manager.h"
#include <algorithm>
#include <memory>
#include <optional>
#include <string>
@ -22,7 +23,6 @@
#include "base/metrics/histogram_functions.h"
#include "base/not_fatal_until.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
@ -823,7 +823,7 @@ void AccountManager::DeletePendingTokenRevocationRequest(
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
auto it =
base::ranges::find(pending_token_revocation_requests_, request,
std::ranges::find(pending_token_revocation_requests_, request,
&std::unique_ptr<GaiaTokenRevocationRequest>::get);
if (it != pending_token_revocation_requests_.end()) {

@ -4,6 +4,7 @@
#include "components/affiliations/core/browser/affiliation_service_impl.h"
#include <algorithm>
#include <vector>
#include "base/containers/contains.h"
@ -11,7 +12,6 @@
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/time/default_clock.h"
@ -167,7 +167,7 @@ GURL AffiliationServiceImpl::GetChangePasswordURL(const GURL& url) const {
return it->second.change_password_url;
}
if (base::ranges::any_of(pending_fetches_, [&uri](const auto& info) {
if (std::ranges::any_of(pending_fetches_, [&uri](const auto& info) {
return base::Contains(info.requested_facets, uri);
})) {
LogFetchResult(GetChangePasswordUrlMetric::kNotFetchedYet);
@ -181,7 +181,7 @@ void AffiliationServiceImpl::OnFetchSucceeded(
AffiliationFetcherInterface* fetcher,
std::unique_ptr<AffiliationFetcherDelegate::Result> result) {
auto processed_fetch =
base::ranges::find(pending_fetches_, fetcher,
std::ranges::find(pending_fetches_, fetcher,
[](const auto& info) { return info.fetcher.get(); });
if (processed_fetch == pending_fetches_.end())
return;

@ -4,12 +4,12 @@
#include "components/affiliations/core/browser/affiliation_utils.h"
#include <algorithm>
#include <map>
#include <ostream>
#include <string_view>
#include "base/base64.h"
#include "base/ranges/algorithm.h"
#include "base/strings/escape.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@ -192,7 +192,7 @@ bool ParseAndCanonicalizeFacetURI(const std::string& input_uri,
std::vector<FacetURI> ExtractAndSortFacetURIs(const AffiliatedFacets& facets) {
std::vector<FacetURI> uris;
uris.reserve(facets.size());
base::ranges::transform(facets, std::back_inserter(uris), &Facet::uri);
std::ranges::transform(facets, std::back_inserter(uris), &Facet::uri);
std::sort(uris.begin(), uris.end());
return uris;
}
@ -467,7 +467,7 @@ bool operator!=(const Facet& lhs, const Facet& rhs) {
}
bool operator==(const GroupedFacets& lhs, const GroupedFacets& rhs) {
if (!base::ranges::is_permutation(lhs.facets, rhs.facets)) {
if (!std::ranges::is_permutation(lhs.facets, rhs.facets)) {
return false;
}
return lhs.branding_info == rhs.branding_info;

@ -9,7 +9,6 @@
#include <tuple>
#include <utility>
#include "base/ranges/algorithm.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace affiliations {
@ -45,17 +44,17 @@ void FakeAffiliationAPI::ServeNextRequest() {
std::unique_ptr<AffiliationFetcherDelegate::Result> fake_response(
new AffiliationFetcherDelegate::Result);
for (const auto& facets : preset_equivalence_relation_) {
bool had_intersection_with_request = base::ranges::any_of(
bool had_intersection_with_request = std::ranges::any_of(
fetcher->GetRequestedFacetURIs(), [&facets](const auto& uri) {
return base::ranges::find(facets, uri, &Facet::uri) != facets.end();
return std::ranges::find(facets, uri, &Facet::uri) != facets.end();
});
if (had_intersection_with_request)
fake_response->affiliations.push_back(facets);
}
for (const auto& group : groups_) {
bool had_intersection_with_request = base::ranges::any_of(
bool had_intersection_with_request = std::ranges::any_of(
fetcher->GetRequestedFacetURIs(), [&group](const auto& uri) {
return base::ranges::find(group.facets, uri, &Facet::uri) !=
return std::ranges::find(group.facets, uri, &Facet::uri) !=
group.facets.end();
});
if (had_intersection_with_request)

@ -4,6 +4,7 @@
#include "components/affiliations/core/browser/sql_table_builder.h"
#include <algorithm>
#include <set>
#include <string_view>
#include <utility>
@ -12,7 +13,6 @@
#include "base/containers/contains.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@ -151,7 +151,7 @@ void SQLTableBuilder::RenameColumn(const std::string& old_name,
DCHECK(FindLastColumnByName(new_name) == columns_.rend());
// Check there is no index in the current version that references |old_name|.
DCHECK(base::ranges::none_of(indices_, [&old_name](const Index& index) {
DCHECK(std::ranges::none_of(indices_, [&old_name](const Index& index) {
return index.max_version == kInvalidVersion &&
base::Contains(index.columns, old_name);
}));
@ -187,7 +187,7 @@ void SQLTableBuilder::DropColumn(const std::string& name) {
auto column = FindLastColumnByName(name);
DCHECK(column != columns_.rend());
// Check there is no index in the current version that references |old_name|.
DCHECK(base::ranges::none_of(indices_, [&name](const Index& index) {
DCHECK(std::ranges::none_of(indices_, [&name](const Index& index) {
return index.max_version == kInvalidVersion &&
base::Contains(index.columns, name);
}));
@ -214,11 +214,11 @@ void SQLTableBuilder::AddIndex(std::string name,
DCHECK(FindLastIndexByName(name) == indices_.rend());
// Check that all referenced columns are present in the last version by making
// sure that the inner predicate applies to all columns names in |columns|.
DCHECK(base::ranges::all_of(columns, [this](const std::string& column_name) {
DCHECK(std::ranges::all_of(columns, [this](const std::string& column_name) {
// Check if there is any column with the required name which is also
// present in the latest version. Note that we don't require the last
// version to be sealed.
return base::ranges::any_of(columns_, [&column_name](const Column& col) {
return std::ranges::any_of(columns_, [&column_name](const Column& col) {
return col.name == column_name && col.max_version == kInvalidVersion;
});
}));
@ -271,7 +271,7 @@ bool SQLTableBuilder::CreateTable(sql::Database* db) const {
std::string constraints = ComputeConstraints(sealed_version_);
DCHECK(!constraints.empty() ||
base::ranges::any_of(columns_, &Column::is_primary_key));
std::ranges::any_of(columns_, &Column::is_primary_key));
std::string names; // Names and types of the current columns.
for (const Column& column : columns_) {
@ -302,7 +302,7 @@ bool SQLTableBuilder::CreateTable(sql::Database* db) const {
auto execute = [&db](const auto& sql) { return db->Execute(sql); };
sql::Transaction transaction(db);
return transaction.Begin() && execute(create_table_statement) &&
base::ranges::all_of(create_index_sqls, execute) &&
std::ranges::all_of(create_index_sqls, execute) &&
transaction.Commit();
}
@ -355,7 +355,7 @@ std::vector<std::string_view> SQLTableBuilder::AllPrimaryKeyNames() const {
size_t SQLTableBuilder::NumberOfColumns() const {
DCHECK(IsVersionLastAndSealed(sealed_version_));
return base::checked_cast<size_t>(base::ranges::count_if(
return base::checked_cast<size_t>(std::ranges::count_if(
columns_,
[this](const Column& column) { return IsColumnInLastVersion(column); }));
}
@ -491,7 +491,7 @@ bool SQLTableBuilder::MigrateToNextFrom(unsigned old_version,
};
sql::Transaction transaction(db);
if (!(transaction.Begin() &&
base::ranges::all_of(names_of_new_columns_list, add_column) &&
std::ranges::all_of(names_of_new_columns_list, add_column) &&
transaction.Commit())) {
return false;
}
@ -532,12 +532,12 @@ bool SQLTableBuilder::MigrateIndicesToNextFrom(unsigned old_version,
std::vector<SQLTableBuilder::Column>::reverse_iterator
SQLTableBuilder::FindLastColumnByName(const std::string& name) {
return base::ranges::find(base::Reversed(columns_), name, &Column::name);
return std::ranges::find(base::Reversed(columns_), name, &Column::name);
}
std::vector<SQLTableBuilder::Index>::reverse_iterator
SQLTableBuilder::FindLastIndexByName(const std::string& name) {
return base::ranges::find(base::Reversed(indices_), name, &Index::name);
return std::ranges::find(base::Reversed(indices_), name, &Index::name);
}
bool SQLTableBuilder::IsVersionLastAndSealed(unsigned version) const {
@ -549,8 +549,8 @@ bool SQLTableBuilder::IsVersionLastAndSealed(unsigned version) const {
column_or_index.max_version != sealed_version_;
};
return sealed_version_ == version &&
base::ranges::all_of(columns_, is_last_sealed) &&
base::ranges::all_of(indices_, is_last_sealed);
std::ranges::all_of(columns_, is_last_sealed) &&
std::ranges::all_of(indices_, is_last_sealed);
}
bool SQLTableBuilder::IsColumnInLastVersion(const Column& column) const {

@ -4,6 +4,7 @@
#include "components/aggregation_service/aggregation_coordinator_utils.h"
#include <algorithm>
#include <string_view>
#include <utility>
#include <vector>
@ -11,7 +12,6 @@
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/no_destructor.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_split.h"
#include "components/aggregation_service/features.h"
#include "components/attribution_reporting/is_origin_suitable.h"
@ -82,7 +82,7 @@ class CoordinatorOrigins {
if (origins_.empty()) {
return false;
}
return base::ranges::all_of(origins_,
return std::ranges::all_of(origins_,
&attribution_reporting::IsOriginSuitable);
}

@ -4,12 +4,13 @@
#include "components/allocation_recorder/crash_handler/payload.h"
#include <algorithm>
#include "base/allocator/dispatcher/notification_data.h"
#include "base/allocator/dispatcher/subsystem.h"
#include "base/bits.h"
#include "base/containers/span.h"
#include "base/debug/allocation_trace.h"
#include "base/ranges/algorithm.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::allocator::dispatcher::AllocationNotificationData;
@ -73,7 +74,7 @@ void VerifyAllocationEntriesAreEqual(
const auto& report_frames = report_entry.stack_trace().frames();
std::vector<const void*> converted_frames;
base::ranges::transform(
std::ranges::transform(
report_frames, std::back_inserter(converted_frames),
[](const allocation_recorder::StackFrame& frame) {
return reinterpret_cast<const void*>(frame.address());

@ -15,7 +15,6 @@
#include "base/debug/debugging_buildflags.h"
#include "base/files/file_path.h"
#include "base/functional/callback.h"
#include "base/ranges/algorithm.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "build/build_config.h"

@ -65,7 +65,7 @@ FormFieldDataAndroidBridgeImpl::GetOrCreateJavaPeer(
const auto& projection) {
std::vector<std::u16string> projected_options;
projected_options.reserve(options.size());
base::ranges::transform(options, std::back_inserter(projected_options),
std::ranges::transform(options, std::back_inserter(projected_options),
projection);
return ToJavaArrayOfStrings(env, projected_options);
};

@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <algorithm>
#include <iterator>
#include <string>
#include "base/android/jni_array.h"
#include "base/base64.h"
#include "base/ranges/algorithm.h"
#include "components/android_autofill/browser/autofill_provider.h"
#include "components/autofill/content/browser/content_autofill_driver.h"
#include "components/autofill/content/browser/content_autofill_driver_factory.h"
@ -135,7 +135,7 @@ JNI_AutofillProviderTestHelper_SimulateMainFramePredictionsAutofillServerRespons
if (form_field_data.id_attribute() == field_ids[i]) {
std::vector<FieldType> field_types;
field_types.reserve(raw_field_types[i].size());
base::ranges::transform(
std::ranges::transform(
raw_field_types[i], std::back_inserter(field_types),
[](int type) -> FieldType { return FieldType(type); });
autofill::test::AddFieldPredictionsToForm(

@ -4,10 +4,10 @@
#include "components/app_restore/arc_read_handler.h"
#include <algorithm>
#include <memory>
#include "base/containers/contains.h"
#include "base/ranges/algorithm.h"
#include "components/app_restore/app_launch_info.h"
#include "components/app_restore/app_restore_info.h"
#include "components/app_restore/app_restore_utils.h"
@ -191,7 +191,7 @@ void ArcReadHandler::RemoveAppRestoreData(int32_t window_id) {
void ArcReadHandler::UpdateWindowCandidates(int32_t task_id,
int32_t restore_window_id) {
// Go through `arc_window_candidates_`.
auto window_it = base::ranges::find(
auto window_it = std::ranges::find(
arc_window_candidates_, task_id,
[](aura::Window* window) { return window->GetProperty(kWindowIdKey); });
if (window_it == arc_window_candidates_.end())

@ -4,8 +4,9 @@
#include "components/app_restore/arc_save_handler.h"
#include <algorithm>
#include "base/containers/contains.h"
#include "base/ranges/algorithm.h"
#include "components/app_restore/app_launch_info.h"
#include "components/app_restore/app_restore_info.h"
#include "components/app_restore/app_restore_utils.h"
@ -47,7 +48,7 @@ void ArcSaveHandler::SaveAppLaunchInfo(AppLaunchInfoPtr app_launch_info) {
// Go through `arc_window_candidates_`. If the window for `session_id` has
// been created, call OnAppLaunched to save the window info.
auto window_it = base::ranges::find(
auto window_it = std::ranges::find(
arc_window_candidates_, session_id, [](aura::Window* window) {
return window->GetProperty(app_restore::kGhostWindowSessionIdKey);
});
@ -193,7 +194,7 @@ void ArcSaveHandler::OnTaskCreated(const std::string& app_id,
// Go through |arc_window_candidates_|. If the window for |task_id| has been
// created, call OnAppLaunched to save the window info.
auto window_it = base::ranges::find(
auto window_it = std::ranges::find(
arc_window_candidates_, task_id, [](aura::Window* window) {
return window->GetProperty(app_restore::kWindowIdKey);
});

@ -139,7 +139,7 @@ bool RestoreData::HasAppTypeBrowser() const {
if (it == app_id_to_launch_list_.end())
return false;
return base::ranges::any_of(
return std::ranges::any_of(
it->second,
[](const std::pair<const int, std::unique_ptr<AppRestoreData>>& data) {
return data.second->browser_extra_info.app_type_browser.value_or(false);
@ -151,7 +151,7 @@ bool RestoreData::HasBrowser() const {
if (it == app_id_to_launch_list_.end())
return false;
return base::ranges::any_of(
return std::ranges::any_of(
it->second,
[](const std::pair<const int, std::unique_ptr<AppRestoreData>>& data) {
return !data.second->browser_extra_info.app_type_browser.value_or(

@ -6,6 +6,7 @@
#include <stdint.h>
#include <algorithm>
#include <optional>
#include <set>
#include <string>
@ -18,7 +19,6 @@
#include "base/functional/function_ref.h"
#include "base/metrics/histogram_functions.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
@ -218,7 +218,7 @@ bool IsValid(int budget,
return false;
}
return base::ranges::all_of(data, [&](const auto& p) {
return std::ranges::all_of(data, [&](const auto& p) {
return IsValueInRange(p.second.value(), budget);
});
}

@ -6,12 +6,12 @@
#include <stddef.h>
#include <algorithm>
#include <optional>
#include <string>
#include <utility>
#include "base/check.h"
#include "base/ranges/algorithm.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
@ -32,7 +32,7 @@ bool AggregatableNamedBudgetKeyHasValidLength(const std::string& key) {
bool IsValid(const AggregatableNamedBudgetDefs::BudgetMap& budgets) {
return budgets.size() <= kMaxAggregatableNamedBudgetsPerSource &&
base::ranges::all_of(budgets, [](const auto& budget) {
std::ranges::all_of(budgets, [](const auto& budget) {
return AggregatableNamedBudgetKeyHasValidLength(budget.first) &&
IsAggregatableBudgetInRange(budget.second);
});

@ -6,13 +6,13 @@
#include <stdint.h>
#include <algorithm>
#include <optional>
#include <utility>
#include "base/check.h"
#include "base/containers/flat_tree.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
@ -29,7 +29,7 @@ namespace {
using ::attribution_reporting::mojom::TriggerRegistrationError;
bool IsValid(const AggregatableValues::Values& values) {
return base::ranges::all_of(values, [](const auto& value) {
return std::ranges::all_of(values, [](const auto& value) {
return IsAggregatableValueInRange(value.second.value());
});
}

@ -4,6 +4,7 @@
#include "components/attribution_reporting/aggregation_keys.h"
#include <algorithm>
#include <optional>
#include <string>
#include <utility>
@ -11,7 +12,6 @@
#include "base/check.h"
#include "base/metrics/histogram_base.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
@ -32,7 +32,7 @@ bool AggregationKeyIdHasValidLength(const std::string& key) {
bool IsValid(const AggregationKeys::Keys& keys) {
return keys.size() <= kMaxAggregationKeysPerSource &&
base::ranges::all_of(keys, [](const auto& key) {
std::ranges::all_of(keys, [](const auto& key) {
return AggregationKeyIdHasValidLength(key.first);
});
}

@ -7,6 +7,7 @@
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <limits>
#include <optional>
#include <string>
@ -16,7 +17,6 @@
#include "base/check_op.h"
#include "base/containers/flat_set.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
@ -164,7 +164,7 @@ bool AttributionScopesSet::IsValidForSource(uint32_t scope_limit) const {
CHECK_GT(scope_limit, 0u);
return scopes_.size() <=
std::min(kMaxScopesPerSource, static_cast<size_t>(scope_limit)) &&
base::ranges::all_of(scopes_, [](const std::string& scope) {
std::ranges::all_of(scopes_, [](const std::string& scope) {
return scope.length() <= kMaxLengthPerAttributionScope;
});
}

@ -12,7 +12,6 @@
#include "base/check.h"
#include "base/containers/flat_set.h"
#include "base/functional/overloaded.h"
#include "base/ranges/algorithm.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
@ -30,7 +29,7 @@ using ::attribution_reporting::mojom::SourceRegistrationError;
bool DestinationsValid(const DestinationSet::Destinations& destinations) {
return !destinations.empty() && destinations.size() <= kMaxDestinations &&
base::ranges::all_of(destinations, &IsSitePotentiallySuitable);
std::ranges::all_of(destinations, &IsSitePotentiallySuitable);
}
} // namespace

@ -6,6 +6,7 @@
#include <stddef.h>
#include <algorithm>
#include <functional>
#include <iterator>
#include <optional>
@ -16,7 +17,6 @@
#include "base/check_op.h"
#include "base/containers/flat_set.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/time/time.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
@ -46,7 +46,7 @@ bool IsReportWindowValid(base::TimeDelta report_window) {
}
bool IsStrictlyIncreasing(const std::vector<base::TimeDelta>& end_times) {
return base::ranges::adjacent_find(end_times, std::not_fn(std::less{})) ==
return std::ranges::adjacent_find(end_times, std::not_fn(std::less{})) ==
end_times.end();
}

@ -6,6 +6,7 @@
#include <stddef.h>
#include <algorithm>
#include <limits>
#include <optional>
#include <string>
@ -18,7 +19,6 @@
#include "base/metrics/histogram_base.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "base/types/expected.h"
@ -265,7 +265,7 @@ bool FilterData::Matches(mojom::SourceType source_type,
// If the filters are negated, the behavior should be that every single filter
// key does not match between the two (negating the function result is not
// sufficient by the API definition).
return base::ranges::any_of(filters, [&](const FilterConfig& config) {
return std::ranges::any_of(filters, [&](const FilterConfig& config) {
if (config.lookback_window()) {
if (duration_since_source_registration >
config.lookback_window().value()) {
@ -277,10 +277,10 @@ bool FilterData::Matches(mojom::SourceType source_type,
}
}
return base::ranges::all_of(
return std::ranges::all_of(
config.filter_values(), [&](const auto& trigger_filter) {
if (trigger_filter.first == kSourceTypeFilterKey) {
bool has_intersection = base::ranges::any_of(
bool has_intersection = std::ranges::any_of(
trigger_filter.second, [&](const std::string& value) {
return value == SourceTypeName(source_type);
});
@ -302,7 +302,7 @@ bool FilterData::Matches(mojom::SourceType source_type,
return negated != source_filter->second.empty();
}
bool has_intersection = base::ranges::any_of(
bool has_intersection = std::ranges::any_of(
trigger_filter.second, [&](const std::string& value) {
return base::Contains(source_filter->second, value);
});

@ -20,7 +20,6 @@
#include "base/containers/flat_set.h"
#include "base/containers/flat_tree.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/abseil_string_number_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"

@ -24,7 +24,6 @@
#include "base/numerics/clamped_math.h"
#include "base/numerics/safe_conversions.h"
#include "base/rand_util.h"
#include "base/ranges/algorithm.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "components/attribution_reporting/attribution_scopes_data.h"
@ -314,7 +313,7 @@ bool IsValid(const RandomizedResponse& response, const TriggerSpecs& specs) {
return base::MakeStrictNum(response->size()) <=
static_cast<int>(specs.max_event_level_reports()) &&
base::ranges::all_of(*response, [&](const FakeEventLevelReport&
std::ranges::all_of(*response, [&](const FakeEventLevelReport&
report) {
const auto spec = specs.find(report.trigger_data,
mojom::TriggerDataMatching::kExact);

@ -4,13 +4,13 @@
#include "components/attribution_reporting/test_utils.h"
#include <algorithm>
#include <optional>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#include "base/ranges/algorithm.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/attribution_reporting/aggregatable_debug_reporting_config.h"
@ -65,7 +65,7 @@ TriggerSpecs SpecsFromWindowList(const std::vector<int>& windows_per_type,
attribution_reporting::TriggerSpecs::TriggerDataIndices indices;
std::vector<attribution_reporting::TriggerSpec> raw_specs;
bool supportable_by_single_spec = base::ranges::all_of(
bool supportable_by_single_spec = std::ranges::all_of(
windows_per_type, [&](int w) { return w == windows_per_type[0]; });
if (collapse_into_single_spec && supportable_by_single_spec) {

@ -6,6 +6,7 @@
#include <stdint.h>
#include <algorithm>
#include <optional>
#include <string>
#include <utility>
@ -14,7 +15,6 @@
#include "base/check.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_tree.h"
#include "base/ranges/algorithm.h"
#include "base/time/time.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
@ -84,7 +84,7 @@ base::expected<void, SourceRegistrationError> ParseTriggerData(
bool AreSpecsValid(const TriggerSpecs::TriggerDataIndices& trigger_data_indices,
const std::vector<TriggerSpec>& specs) {
return trigger_data_indices.size() <= kMaxTriggerDataPerSource &&
base::ranges::all_of(trigger_data_indices, [&specs](const auto& pair) {
std::ranges::all_of(trigger_data_indices, [&specs](const auto& pair) {
return pair.second < specs.size();
});
}

@ -6,6 +6,7 @@
#include <stddef.h>
#include <algorithm>
#include <cstdint>
#include <functional>
#include <memory>
@ -25,7 +26,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_split.h"
#include "base/strings/string_util.h"
@ -1045,7 +1045,7 @@ void AutofillAgent::ApplyFieldsAction(
auto host_form_is_connected = [](const FormFieldData::FillData& fill_data) {
return !form_util::GetFormByRendererId(fill_data.host_form_id).IsNull();
};
if (auto it = base::ranges::find_if(fields, host_form_is_connected);
if (auto it = std::ranges::find_if(fields, host_form_is_connected);
it != fields.end()) {
base::FeatureList::IsEnabled(
features::kAutofillAcceptDomMutationAfterAutofillSubmission)
@ -1937,7 +1937,7 @@ void AutofillAgent::JavaScriptChangedValue(WebFormControlElement element,
std::vector<FormFieldData> fields =
provisionally_saved_form()->ExtractFields();
if (auto it =
base::ranges::find(fields, form_util::GetFieldRendererId(element),
std::ranges::find(fields, form_util::GetFieldRendererId(element),
&FormFieldData::renderer_id);
it != fields.end()) {
it->set_value(element.Value().Utf16());

@ -4,11 +4,11 @@
#include "components/autofill/content/renderer/form_autofill_issues.h"
#include <algorithm>
#include <string_view>
#include <vector>
#include "base/no_destructor.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_split.h"
#include "components/autofill/content/renderer/form_autofill_util.h"
#include "components/autofill/core/common/autofill_features.h"
@ -125,7 +125,7 @@ void MaybeAppendDuplicateIdForInputDevtoolsIssue(
elements_with_id_attr.push_back(element);
}
}
base::ranges::sort(elements_with_id_attr, [](const WebFormControlElement& a,
std::ranges::sort(elements_with_id_attr, [](const WebFormControlElement& a,
const WebFormControlElement& b) {
return std::forward_as_tuple(a.GetIdAttribute(),
GetShadowHostDOMNodeId(a)) <
@ -133,7 +133,7 @@ void MaybeAppendDuplicateIdForInputDevtoolsIssue(
});
for (auto it = elements_with_id_attr.begin();
(it = base::ranges::adjacent_find(
(it = std::ranges::adjacent_find(
it, elements_with_id_attr.end(),
[](const WebFormControlElement& a, const WebFormControlElement& b) {
return a.GetIdAttribute() == b.GetIdAttribute() &&

@ -89,7 +89,7 @@ TEST_F(FormAutofillIssuesTest, FormDuplicateIdForInputError) {
GetFormIssuesForTesting(form_target.GetFormControlElements(), {});
int duplicated_ids_issue_count =
base::ranges::count_if(form_issues, [](const FormIssue& form_issue) {
std::ranges::count_if(form_issues, [](const FormIssue& form_issue) {
return form_issue.issue_type ==
GenericIssueErrorType::kFormDuplicateIdForInputError &&
form_issue.violating_node_attribute.Utf8() == "id";

@ -32,7 +32,6 @@
#include "base/not_fatal_until.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_split.h"
#include "base/strings/utf_string_conversions.h"
@ -543,7 +542,7 @@ bool AttributeHasButtonFeature(const WebString& attribute) {
if (attribute.IsNull())
return false;
std::string value = attribute.Utf8();
base::ranges::transform(value, value.begin(), ::tolower);
std::ranges::transform(value, value.begin(), ::tolower);
for (const char* const button_feature : kButtonFeatures) {
if (value.find(button_feature, 0) != std::string::npos)
return true;
@ -1402,15 +1401,15 @@ FormFieldData* SearchForFormControlByName(
return nullptr;
auto get_field_name = [](const auto& p) { return p.first->name(); };
auto it = base::ranges::find(fields, field_name, get_field_name);
auto it = std::ranges::find(fields, field_name, get_field_name);
auto end = fields.end();
if (it == end ||
base::ranges::find(it + 1, end, field_name, get_field_name) != end) {
std::ranges::find(it + 1, end, field_name, get_field_name) != end) {
auto ShadowHostHasTargetName = [&](const auto& p) {
return base::Contains(p.second.shadow_host_name_attributes, field_name) ||
base::Contains(p.second.shadow_host_id_attributes, field_name);
};
it = base::ranges::find_if(fields, ShadowHostHasTargetName);
it = std::ranges::find_if(fields, ShadowHostHasTargetName);
if (it != end) {
label_source =
base::Contains(it->second.shadow_host_name_attributes, field_name)
@ -2411,7 +2410,7 @@ FindFormAndFieldForFormControlElement(
form->set_fields({std::move(field)});
}
if (auto it = base::ranges::find(form->fields(), GetFieldRendererId(element),
if (auto it = std::ranges::find(form->fields(), GetFieldRendererId(element),
&FormFieldData::renderer_id);
it != form->fields().end()) {
return std::make_optional(std::make_pair(std::move(*form), raw_ref(*it)));
@ -2767,11 +2766,11 @@ void TraverseDomForFourDigitCombinations(
std::vector<WebFormControlElement> form_control_elements;
for (const WebFormElement& form : document.GetTopLevelForms()) {
base::ranges::move(GetOwnedFormControls(document, form),
std::ranges::move(GetOwnedFormControls(document, form),
std::back_inserter(form_control_elements));
}
base::ranges::move(GetOwnedFormControls(document, WebFormElement()),
std::ranges::move(GetOwnedFormControls(document, WebFormElement()),
std::back_inserter(form_control_elements));
auto extract_four_digit_combinations = [&](WebNode node) {

@ -4,12 +4,12 @@
#include "components/autofill/content/renderer/form_cache.h"
#include <algorithm>
#include <optional>
#include <string_view>
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ref.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"

@ -4,6 +4,7 @@
#include "components/autofill/content/renderer/page_passwords_analyser.h"
#include <algorithm>
#include <map>
#include <stack>
#include <string>
@ -12,7 +13,6 @@
#include "base/containers/contains.h"
#include "base/lazy_instance.h"
#include "base/memory/raw_ptr.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@ -301,7 +301,7 @@ void InferUsernameField(
WebElement control(label.CorrespondingControl());
if (control && control.IsFormControlElement()) {
WebFormControlElement form_control(control.To<WebFormControlElement>());
auto found = base::ranges::find(inputs, form_control);
auto found = std::ranges::find(inputs, form_control);
if (found != inputs.end()) {
std::string label_content(
base::UTF16ToUTF8(form_util::FindChildText(label)));

@ -6,6 +6,7 @@
#include <stddef.h>
#include <algorithm>
#include <iterator>
#include <memory>
#include <optional>
@ -26,7 +27,6 @@
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@ -370,7 +370,7 @@ WebInputElement FindUsernameElementPrecedingPasswordElement(
form_util::GetOwnedAutofillableFormControls(
frame->GetDocument(), password_element.GetOwningFormForAutofill());
auto iter = base::ranges::find(elements, password_element);
auto iter = std::ranges::find(elements, password_element);
if (iter == elements.end())
return WebInputElement();

@ -4,6 +4,7 @@
#include "components/autofill/content/renderer/password_generation_agent.h"
#include <algorithm>
#include <memory>
#include <utility>
@ -13,7 +14,6 @@
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/ranges/algorithm.h"
#include "base/task/single_thread_task_runner.h"
#include "components/autofill/content/renderer/form_autofill_util.h"
#include "components/autofill/content/renderer/password_autofill_agent.h"
@ -60,7 +60,7 @@ using Logger = ::autofill::SavePasswordProgressLogger;
FieldRendererId FindConfirmationPasswordFieldId(
const std::vector<WebFormControlElement>& control_elements,
const WebFormControlElement& new_password) {
auto iter = base::ranges::find(control_elements, new_password);
auto iter = std::ranges::find(control_elements, new_password);
if (iter == control_elements.end())
return FieldRendererId();

@ -4,6 +4,7 @@
#include <stddef.h>
#include <algorithm>
#include <map>
#include <memory>
#include <vector>
@ -13,7 +14,6 @@
#include "base/files/file_path.h"
#include "base/no_destructor.h"
#include "base/path_service.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@ -264,7 +264,7 @@ void AutofillMergeTest::MergeProfiles(const std::string& profiles,
// To ensure a consistent order with the output files, sort the profiles by
// modification date. This corresponds to the order in which the profiles
// were imported (or updated).
base::ranges::sort(imported_profiles,
std::ranges::sort(imported_profiles,
[](const AutofillProfile* a, const AutofillProfile* b) {
return a->usage_history().modification_date() <
b->usage_history().modification_date();

@ -14,7 +14,6 @@
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/metrics/histogram_macros.h"
#include "base/ranges/algorithm.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/types/optional_ref.h"
@ -89,8 +88,8 @@ std::deque<FieldSuggestion> MergeManualAndServerOverrides(
}
}
// At most one override source is non-empty - preserve the values.
base::ranges::move(manual_overrides, std::back_inserter(result));
base::ranges::move(server_overrides, std::back_inserter(result));
std::ranges::move(manual_overrides, std::back_inserter(result));
std::ranges::move(server_overrides, std::back_inserter(result));
return result;
}
@ -646,7 +645,7 @@ std::vector<AutofillUploadContents> EncodeUploadRequest(
}
std::vector<AutofillField*> upload_fields(form.fields().size());
base::ranges::transform(form.fields(), upload_fields.begin(),
std::ranges::transform(form.fields(), upload_fields.begin(),
&std::unique_ptr<AutofillField>::get);
EncodeFormFieldsForUpload(form, upload_fields, &upload);
std::vector<AutofillUploadContents> uploads = {std::move(upload)};
@ -660,7 +659,7 @@ std::vector<AutofillUploadContents> EncodeUploadRequest(
field->host_form_signature() == form.form_signature();
});
// Partition `upload_fields` with respect to the forms' renderer id.
base::ranges::stable_sort(upload_fields, /*comp=*/{},
std::ranges::stable_sort(upload_fields, /*comp=*/{},
&FormFieldData::renderer_form_id);
for (auto subform_begin = upload_fields.begin();

@ -4,7 +4,8 @@
#include "components/autofill/core/browser/crowdsourcing/disambiguate_possible_field_types.h"
#include "base/ranges/algorithm.h"
#include <algorithm>
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/test_utils/autofill_test_utils.h"
#include "components/autofill/core/common/autofill_features.h"
@ -56,7 +57,7 @@ class DisambiguatePossibleFieldTypesTest : public ::testing::Test {
DisambiguatePossibleFieldTypes(form_structure);
std::vector<FieldTypeSet> disambiguated_possible_field_types;
base::ranges::transform(
std::ranges::transform(
form_structure.fields(),
std::back_inserter(disambiguated_possible_field_types),
[](const std::unique_ptr<AutofillField>& field) {

@ -310,7 +310,7 @@ void VotesUploader::UploadVote(
const std::u16string& last_unlocked_credit_card_cvc,
ukm::SourceId ukm_source_id) {
auto count_types = [&submitted_form](FormType type) {
return base::ranges::count_if(
return std::ranges::count_if(
submitted_form->fields(),
[=](const std::unique_ptr<AutofillField>& field) {
return FieldTypeGroupToFormType(field->Type().group()) == type;

@ -4,9 +4,10 @@
#include "components/autofill/core/browser/data_manager/addresses/address_data_cleaner.h"
#include <algorithm>
#include "base/containers/to_vector.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "components/autofill/core/browser/data_manager/addresses/address_data_manager.h"
#include "components/autofill/core/browser/data_manager/personal_data_manager.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
@ -74,7 +75,7 @@ void DeduplicateProfiles(const AutofillProfileComparator& comparator,
local_profile_it != account_profiles.begin(); ++local_profile_it) {
// If possible, merge `*local_profile_it` with another local profile and
// remove it.
if (auto merge_candidate = base::ranges::find_if(
if (auto merge_candidate = std::ranges::find_if(
local_profile_it + 1, account_profiles.begin(),
[&](const AutofillProfile& local_profile2) {
return comparator.AreMergeable(*local_profile_it, local_profile2);
@ -89,7 +90,7 @@ void DeduplicateProfiles(const AutofillProfileComparator& comparator,
}
// `*local_profile_it` is not mergeable with another local profile. But it
// might be a subset of an account profile and can thus be removed.
if (auto superset_account_profile = base::ranges::find_if(
if (auto superset_account_profile = std::ranges::find_if(
account_profiles,
[&](const AutofillProfile& account_profile) {
return comparator.AreMergeable(*local_profile_it,

@ -4,6 +4,7 @@
#include "components/autofill/core/browser/data_manager/addresses/address_data_manager.h"
#include <algorithm>
#include <iterator>
#include <memory>
@ -15,7 +16,6 @@
#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "components/autofill/core/browser/country_type.h"
@ -54,21 +54,21 @@ void OrderProfiles(std::vector<const AutofillProfile*>& profiles,
case AddressDataManager::ProfileOrder::kNone:
break;
case AddressDataManager::ProfileOrder::kHighestFrecencyDesc:
base::ranges::sort(
std::ranges::sort(
profiles, [comparison_time = AutofillClock::Now()](
const AutofillProfile* a, const AutofillProfile* b) {
return a->HasGreaterRankingThan(b, comparison_time);
});
break;
case AddressDataManager::ProfileOrder::kMostRecentlyModifiedDesc:
base::ranges::sort(
std::ranges::sort(
profiles, [](const AutofillProfile* a, const AutofillProfile* b) {
return a->usage_history().modification_date() >
b->usage_history().modification_date();
});
break;
case AddressDataManager::ProfileOrder::kMostRecentlyUsedFirstDesc:
base::ranges::sort(profiles, [](const AutofillProfile* a,
std::ranges::sort(profiles, [](const AutofillProfile* a,
const AutofillProfile* b) {
return a->usage_history().use_date() > b->usage_history().use_date();
});
@ -216,7 +216,7 @@ std::vector<const AutofillProfile*> AddressDataManager::GetProfilesForSettings()
const AutofillProfile* AddressDataManager::GetProfileByGUID(
const std::string& guid) const {
std::vector<const AutofillProfile*> profiles = GetProfiles();
auto it = base::ranges::find(
auto it = std::ranges::find(
profiles, guid,
[](const AutofillProfile* profile) { return profile->guid(); });
return it != profiles.end() ? *it : nullptr;
@ -256,7 +256,7 @@ void AddressDataManager::UpdateProfile(const AutofillProfile& profile) {
// Duplicates can exist across record types.
const std::vector<const AutofillProfile*> profiles =
GetProfilesByRecordType(profile.record_type());
auto duplicate_profile_iter = base::ranges::find_if(
auto duplicate_profile_iter = std::ranges::find_if(
profiles, [&profile](const AutofillProfile* other_profile) {
return profile.guid() != other_profile->guid() &&
other_profile->Compare(profile) == 0;
@ -684,14 +684,14 @@ void AddressDataManager::OnAutofillProfileChanged(
case AutofillProfileChange::UPDATE:
if (existing_profile &&
!existing_profile->EqualsForUpdatePurposes(profile)) {
profiles_.erase(base::ranges::find(profiles_, existing_profile->guid(),
profiles_.erase(std::ranges::find(profiles_, existing_profile->guid(),
&AutofillProfile::guid));
profiles_.push_back(profile);
}
break;
case AutofillProfileChange::REMOVE:
if (existing_profile) {
profiles_.erase(base::ranges::find(profiles_, existing_profile->guid(),
profiles_.erase(std::ranges::find(profiles_, existing_profile->guid(),
&AutofillProfile::guid));
}
break;

@ -37,7 +37,7 @@ void TestAddressDataManager::AddProfile(const AutofillProfile& profile) {
void TestAddressDataManager::UpdateProfile(const AutofillProfile& profile) {
auto adm_profile =
base::ranges::find(profiles_, profile.guid(), &AutofillProfile::guid);
std::ranges::find(profiles_, profile.guid(), &AutofillProfile::guid);
if (adm_profile != profiles_.end()) {
*adm_profile = profile;
NotifyObservers();
@ -45,7 +45,7 @@ void TestAddressDataManager::UpdateProfile(const AutofillProfile& profile) {
}
void TestAddressDataManager::RemoveProfile(const std::string& guid) {
profiles_.erase(base::ranges::find(profiles_, guid, &AutofillProfile::guid));
profiles_.erase(std::ranges::find(profiles_, guid, &AutofillProfile::guid));
NotifyObservers();
}
@ -56,7 +56,7 @@ void TestAddressDataManager::LoadProfiles() {
void TestAddressDataManager::RecordUseOf(const AutofillProfile& profile) {
auto adm_profile =
base::ranges::find(profiles_, profile.guid(), &AutofillProfile::guid);
std::ranges::find(profiles_, profile.guid(), &AutofillProfile::guid);
if (adm_profile != profiles_.end()) {
adm_profile->RecordAndLogUse();
}

@ -4,6 +4,7 @@
#include "components/autofill/core/browser/data_manager/payments/payments_data_manager.h"
#include <algorithm>
#include <memory>
#include "base/containers/span.h"
@ -12,7 +13,6 @@
#include "base/functional/callback_forward.h"
#include "base/i18n/timezone.h"
#include "base/metrics/histogram_macros.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "base/uuid.h"
#include "components/autofill/core/browser/autofill_shared_storage_handler.h"
@ -98,7 +98,7 @@ template <typename T>
typename std::vector<T>::const_iterator FindElementByGUID(
const std::vector<T>& container,
std::string_view guid) {
return base::ranges::find(container, guid, [](const auto& element) {
return std::ranges::find(container, guid, [](const auto& element) {
return Deref(element).guid();
});
}
@ -125,7 +125,7 @@ std::vector<const CreditCard*> DeduplicatedCreditCardsForSuggestions(
CHECK_NE(card->record_type(), CreditCard::RecordType::kFullServerCard);
// Masked server cards are preferred over their local duplicates.
if (!CreditCard::IsLocalCard(card) ||
base::ranges::none_of(
std::ranges::none_of(
cards_to_suggest, [&card](const CreditCard* other_card) {
return card != other_card &&
card->IsLocalOrServerDuplicateOf(*other_card);
@ -777,11 +777,10 @@ std::vector<Iban> PaymentsDataManager::GetOrderedIbansToSuggest() const {
});
});
base::ranges::sort(available_ibans,
[comparison_time = AutofillClock::Now()](
std::ranges::sort(available_ibans, [comparison_time = AutofillClock::Now()](
const Iban* iban0, const Iban* iban1) {
return iban0->usage_history().HasGreaterRankingThan(
iban1->usage_history(), comparison_time);
return iban0->usage_history().HasGreaterRankingThan(iban1->usage_history(),
comparison_time);
});
std::vector<Iban> ibans_to_suggest;
@ -863,7 +862,7 @@ PaymentsDataManager::GetActiveAutofillPromoCodeOffersForOrigin(
return {};
}
std::vector<const AutofillOfferData*> promo_code_offers_for_origin;
base::ranges::for_each(
std::ranges::for_each(
autofill_offer_data_,
[&](const std::unique_ptr<AutofillOfferData>& autofill_offer_data) {
if (autofill_offer_data.get()->IsPromoCodeOffer() &&
@ -1099,7 +1098,7 @@ const CreditCard* PaymentsDataManager::GetServerCardForLocalCard(
std::vector<const CreditCard*> server_cards = GetServerCreditCards();
auto it =
base::ranges::find_if(server_cards, [&](const CreditCard* server_card) {
std::ranges::find_if(server_cards, [&](const CreditCard* server_card) {
return local_card->IsLocalOrServerDuplicateOf(*server_card);
});
return it != server_cards.end() ? *it : nullptr;
@ -1280,7 +1279,7 @@ std::vector<const CreditCard*> PaymentsDataManager::GetCreditCardsToSuggest(
: GetLocalCreditCards());
// Rank the cards by ranking score (see UsageHistoryInformation for details).
// All expired cards should be suggested last, also by ranking score.
base::ranges::sort(
std::ranges::sort(
cards_to_suggest,
[comparison_time = base::Time::Now(), should_use_legacy_algorithm](
const CreditCard* a, const CreditCard* b) {
@ -2088,7 +2087,7 @@ void PaymentsDataManager::OnServerCreditCardsRefreshed() {
}
size_t PaymentsDataManager::GetServerCardWithArtImageCount() const {
return base::ranges::count_if(
return std::ranges::count_if(
server_credit_cards_.begin(), server_credit_cards_.end(),
[](const auto& card) { return card->card_art_url().is_valid(); });
}

@ -6,6 +6,7 @@
#include <stddef.h>
#include <algorithm>
#include <list>
#include <map>
#include <memory>
@ -16,7 +17,6 @@
#include "base/containers/contains.h"
#include "base/memory/raw_ptr.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/scoped_observation.h"
#include "base/strings/utf_string_conversions.h"

@ -84,12 +84,12 @@ void TestPaymentsDataManager::LoadIbans() {
void TestPaymentsDataManager::RemoveByGUID(const std::string& guid) {
if (const CreditCard* credit_card = GetCreditCardByGUID(guid)) {
local_credit_cards_.erase(base::ranges::find(
local_credit_cards_.erase(std::ranges::find(
local_credit_cards_, credit_card, &std::unique_ptr<CreditCard>::get));
NotifyObservers();
} else if (const Iban* iban = GetIbanByGUID(guid)) {
local_ibans_.erase(
base::ranges::find(local_ibans_, iban, &std::unique_ptr<Iban>::get));
std::ranges::find(local_ibans_, iban, &std::unique_ptr<Iban>::get));
NotifyObservers();
}
}
@ -104,8 +104,7 @@ void TestPaymentsDataManager::RecordUseOfIban(Iban& iban) {
std::unique_ptr<Iban> updated_iban = std::make_unique<Iban>(iban);
std::vector<std::unique_ptr<Iban>>& container =
iban.record_type() == Iban::kLocalIban ? local_ibans_ : server_ibans_;
auto it =
base::ranges::find(container,
auto it = std::ranges::find(container,
iban.record_type() == Iban::kLocalIban
? GetIbanByGUID(iban.guid())
: GetIbanByInstrumentId(iban.instrument_id()),
@ -340,7 +339,7 @@ void TestPaymentsDataManager::SetNicknameForCardWithGUID(
void TestPaymentsDataManager::RemoveCardWithoutNotification(
const CreditCard& card) {
if (auto it = base::ranges::find(local_credit_cards_, card.guid(),
if (auto it = std::ranges::find(local_credit_cards_, card.guid(),
&CreditCard::guid);
it != local_credit_cards_.end()) {
local_credit_cards_.erase(it);

@ -4,11 +4,11 @@
#include "components/autofill/core/browser/data_model/autofill_i18n_api.h"
#include <algorithm>
#include <string>
#include <type_traits>
#include "base/containers/contains.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/data_model/autofill_i18n_formatting_expressions.h"

@ -6,7 +6,6 @@
#include <algorithm>
#include "base/ranges/algorithm.h"
#include "components/autofill/core/common/autofill_clock.h"
namespace autofill {
@ -134,7 +133,7 @@ bool AutofillOfferData::IsGPayPromoCodeOffer() const {
bool AutofillOfferData::IsActiveAndEligibleForOrigin(const GURL& origin) const {
return expiry_ > AutofillClock::Now() &&
base::ranges::count(merchant_origins_, origin) > 0;
std::ranges::count(merchant_origins_, origin) > 0;
}
AutofillOfferData::AutofillOfferData(

@ -24,7 +24,6 @@
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversion_utils.h"
@ -1234,7 +1233,7 @@ std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile) {
FieldTypeSet field_types_to_print;
profile.GetSupportedTypes(&field_types_to_print);
base::ranges::for_each(field_types_to_print, print_values_lambda);
std::ranges::for_each(field_types_to_print, print_values_lambda);
return os;
}

@ -12,7 +12,6 @@
#include "base/i18n/char_iterator.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversion_utils.h"
#include "base/strings/utf_string_conversions.h"

@ -1463,7 +1463,7 @@ TEST_F(AutofillProfileTest, Compare_StructuredTypes) {
ASSERT_NE(value1, value2);
ASSERT_NE(status1, status2);
std::vector<AddressCountryCode> country_codes;
base::ranges::transform(country_data_map->country_codes(),
std::ranges::transform(country_data_map->country_codes(),
back_inserter(country_codes),
[](const std::string& country_code) {
return AddressCountryCode(country_code);

@ -12,7 +12,6 @@
#include "base/containers/to_vector.h"
#include "base/feature_list.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"

@ -4,11 +4,11 @@
#include "components/autofill/core/browser/data_model/phone_number.h"
#include <algorithm>
#include <string>
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/autofill_type.h"
@ -307,7 +307,7 @@ TEST(PhoneNumberTest, HelperSetsAllPhoneFieldTypes) {
return GroupTypeOfFieldType(type) != FieldTypeGroup::kPhone;
});
base::ranges::for_each(fields, [](FieldType type) {
std::ranges::for_each(fields, [](FieldType type) {
PhoneNumber::PhoneCombineHelper helper;
helper.SetInfo(type, u"123");
});

@ -13,7 +13,6 @@
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/rand_util.h"
#include "base/ranges/algorithm.h"
#include "base/strings/levenshtein_distance.h"
#include "base/strings/string_util.h"
#include "base/types/cxx23_to_underlying.h"
@ -117,10 +116,10 @@ bool ProfileTokenQuality::operator==(const ProfileTokenQuality& other) const {
// Element-wise comparison between `observations_` and `other.observations_`.
// base::circular_deque<> intentionally doesn't define a comparison operator.
using map_entry_t = std::pair<FieldType, base::circular_deque<Observation>>;
return base::ranges::equal(observations_, other.observations_,
return std::ranges::equal(observations_, other.observations_,
[](const map_entry_t& a, const map_entry_t& b) {
return a.first == b.first &&
base::ranges::equal(a.second, b.second);
std::ranges::equal(a.second, b.second);
});
}

@ -4,12 +4,12 @@
#include "components/autofill/core/browser/data_quality/addresses/profile_token_quality.h"
#include <algorithm>
#include <memory>
#include <string>
#include <string_view>
#include <vector>
#include "base/ranges/algorithm.h"
#include "base/test/task_environment.h"
#include "base/types/cxx23_to_underlying.h"
#include "components/autofill/core/browser/autofill_field.h"
@ -349,7 +349,7 @@ TEST_P(ProfileTokenQualityObservationDroppingTest,
EXPECT_TRUE(quality.AddObservationsForFilledForm(
*bam_.FindCachedFormById(form.global_id()), form, adm()));
EXPECT_EQ(test.expected_number_of_observations,
base::ranges::count_if(test.form_types, [&](FieldType type) {
std::ranges::count_if(test.form_types, [&](FieldType type) {
return !quality.GetObservationTypesForFieldType(type).empty();
}));
}

@ -58,7 +58,7 @@ const FieldTypeSet& GetDatabaseStoredTypesOfAutofillProfile() {
size_t NumberOfPossibleFieldTypesInGroup(const AutofillField& field,
FieldTypeGroup group) {
return base::ranges::count(field.possible_types(), group,
return std::ranges::count(field.possible_types(), group,
GroupTypeOfFieldType);
}

@ -4,13 +4,13 @@
#include "components/autofill/core/browser/filling/addresses/field_filling_address_util.h"
#include <algorithm>
#include <optional>
#include <string>
#include "base/i18n/char_iterator.h"
#include "base/i18n/unicodestring.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@ -162,10 +162,10 @@ std::u16string GetStateSelectControlValue(
// Remove `abbreviations` from the `full_names` as a precautionary measure in
// case the `AlternativeStateNameMap` contains bad data.
base::ranges::sort(abbreviations);
std::ranges::sort(abbreviations);
std::erase_if(full_names, [&](const std::u16string& full_name) {
return full_name.empty() ||
base::ranges::binary_search(abbreviations, full_name);
std::ranges::binary_search(abbreviations, full_name);
});
// Try an exact match of the abbreviation first.
@ -414,7 +414,7 @@ std::u16string GetPhoneCountryCodeSelectControlValue(
phone_country_code;
};
auto first_match =
base::ranges::find_if(field_options, value_or_content_matches);
std::ranges::find_if(field_options, value_or_content_matches);
if (base::FeatureList::IsEnabled(
features::
@ -440,7 +440,7 @@ std::u16string GetPhoneCountryCodeSelectControlValue(
}
// If the <option>s do contain phone country codes, we pick the current
// option only if the phone country code matches.
auto selected_option = base::ranges::find_if(
auto selected_option = std::ranges::find_if(
field_options,
[&](const SelectOption& o) { return o.value == option; });
if (value_or_content_matches(*selected_option)) {

@ -4,12 +4,12 @@
#include "components/autofill/core/browser/filling/addresses/field_filling_address_util.h"
#include <algorithm>
#include <memory>
#include <string>
#include <vector>
#include "base/path_service.h"
#include "base/ranges/algorithm.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "components/autofill/core/browser/autofill_field.h"

@ -99,7 +99,7 @@ void FormAutofillHistory::EraseFormFillEntry(FillOperation fill_operation) {
FormAutofillHistory::FillOperation
FormAutofillHistory::GetLastFillingOperationForField(
FieldGlobalId field_id) const {
return FillOperation(base::ranges::find_if(
return FillOperation(std::ranges::find_if(
history_, [&field_id](const FormFillingEntry& operation) {
return operation.field_filling_entries.contains(field_id);
}));

@ -711,15 +711,15 @@ void FormFiller::FillOrPreviewForm(
safe_filled_fields.old_values.push_back(
form.FindFieldByGlobalId(field_id));
safe_filled_fields.new_values.push_back([&] {
auto fields_it = base::ranges::find(result_fields, field_id,
auto fields_it = std::ranges::find(result_fields, field_id,
&FormFieldData::global_id);
return fields_it != result_fields.end() ? &*fields_it : nullptr;
}());
safe_filled_fields.cached.push_back(
form_structure.GetFieldById(field_id));
} else {
auto it = base::ranges::find(form.fields(), field_id,
&FormFieldData::global_id);
auto it =
std::ranges::find(form.fields(), field_id, &FormFieldData::global_id);
CHECK(it != result_fields.end());
std::string field_number =
base::StringPrintf("Field %zu", it - result_fields.begin());
@ -842,7 +842,7 @@ void FormFiller::TriggerRefill(const FormData& form,
field->renderer_id());
};
auto it =
base::ranges::max_element(*form_structure, {}, comparison_attributes);
std::ranges::max_element(*form_structure, {}, comparison_attributes);
AutofillField* autofill_field =
it != form_structure->end() ? it->get() : nullptr;
bool found_matching_element =

@ -4,6 +4,7 @@
#include <stddef.h>
#include <algorithm>
#include <memory>
#include <optional>
#include <string>
@ -12,7 +13,6 @@
#include "base/containers/flat_map.h"
#include "base/containers/span.h"
#include "base/feature_list.h"
#include "base/ranges/algorithm.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
@ -202,7 +202,7 @@ class FormFillerTest : public testing::Test {
/*ignorable_skip_reasons=*/{}, trigger_source);
// Copy the filled data into the form.
for (FormFieldData& field : test_api(form).fields()) {
if (auto it = base::ranges::find(filled_fields, field.global_id(),
if (auto it = std::ranges::find(filled_fields, field.global_id(),
&FormFieldData::global_id);
it != filled_fields.end()) {
field = *it;

@ -4,9 +4,9 @@
#include "components/autofill/core/browser/filling/payments/field_filling_payments_util.h"
#include <algorithm>
#include <optional>
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "components/autofill/core/browser/autofill_field.h"
@ -15,8 +15,8 @@
#include "components/autofill/core/browser/data_quality/autofill_data_util.h"
#include "components/autofill/core/browser/field_type_utils.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/filling/form_filler.h"
#include "components/autofill/core/browser/filling/filling_product.h"
#include "components/autofill/core/browser/filling/form_filler.h"
#include "components/autofill/core/browser/form_parsing/credit_card_field_parser.h"
#include "components/autofill/core/browser/form_structure.h"
#include "components/autofill/core/browser/select_control_util.h"
@ -409,7 +409,7 @@ std::u16string GetFillingValueForCreditCardForInput(
// Replaces the digits in `value` with dots. Used for credit card preview when
// obfuscating card information to the user.
std::u16string ReplaceDigitsWithCenterDots(std::u16string value) {
base::ranges::replace_if(
std::ranges::replace_if(
value.begin(), value.end(),
[](char16_t c) { return base::IsAsciiDigit(c); },
kMidlineEllipsisPlainDot);
@ -524,7 +524,7 @@ bool WillFillCreditCardNumberOrCvc(
// exists in the renderer and whether it is fillable.
auto IsFillableField =
[&fields, &trigger_autofill_field](const AutofillField& autofill_field) {
auto field = base::ranges::find(fields, autofill_field.global_id(),
auto field = std::ranges::find(fields, autofill_field.global_id(),
&FormFieldData::global_id);
if (field == fields.end()) {
return false;

@ -6,6 +6,7 @@
#include <stddef.h>
#include <algorithm>
#include <memory>
#include <string>
#include <vector>
@ -14,7 +15,6 @@
#include "base/files/file_path.h"
#include "base/notreached.h"
#include "base/path_service.h"
#include "base/ranges/algorithm.h"
#include "base/stl_util.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
@ -97,7 +97,7 @@ AutofillField CreateTestSelectAutofillField(
size_t GetIndexOfValue(const std::vector<SelectOption>& values,
const std::u16string& value) {
size_t i =
base::ranges::find(values, value, &SelectOption::value) - values.begin();
std::ranges::find(values, value, &SelectOption::value) - values.begin();
CHECK_LT(i, values.size()) << "Passing invalid arguments to GetIndexOfValue";
return i;
}
@ -245,7 +245,7 @@ TEST_F(FieldFillingPaymentsUtilTest, FillFormField_Preview_CreditCardField) {
CreditCard credit_card;
credit_card.SetNumber(u"4111111111111111");
// Verify that the field contains 4 but no more than 4 digits.
size_t num_digits = base::ranges::count_if(
size_t num_digits = std::ranges::count_if(
GetFillingValueForCreditCard(credit_card, kAppLocale,
mojom::ActionPersistence::kPreview, field),
&base::IsAsciiDigit<char16_t>);

@ -388,7 +388,7 @@ void AddressProfileSaveManagerTest::VerifyUMAMetricsCollection(
}
// The import can only be one of {new, updated, migrated} profile at once.
ASSERT_EQ(
base::ranges::count(std::vector<bool>{IsNewProfile(test_scenario),
std::ranges::count(std::vector<bool>{IsNewProfile(test_scenario),
IsConfirmableMerge(test_scenario),
IsMigration(test_scenario)},
true),

@ -4,11 +4,11 @@
#include "components/autofill/core/browser/form_import/addresses/autofill_profile_import_process.h"
#include <algorithm>
#include <map>
#include "base/check_deref.h"
#include "base/feature_list.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/data_manager/addresses/address_data_cleaner.h"
#include "components/autofill/core/browser/data_manager/addresses/address_data_manager.h"

@ -18,7 +18,6 @@
#include "base/check_deref.h"
#include "base/containers/flat_map.h"
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
@ -999,7 +998,7 @@ FormDataImporter::ExtractCreditCardFromForm(const FormStructure& form) {
// the index of the option text in the select options and try the
// corresponding value.
if (auto it =
base::ranges::find(field.options(), value, &SelectOption::text);
std::ranges::find(field.options(), value, &SelectOption::text);
it != field.options().end()) {
result.card.SetInfo(field.Type(), it->value, app_locale);
}

@ -23,7 +23,6 @@
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/metrics/histogram_tester.h"
@ -259,7 +258,7 @@ TypeValuePairs GetDefaultProfileTypeValuePairs() {
void SetValueForType(TypeValuePairs& pairs,
FieldType type,
const std::string& value) {
auto it = base::ranges::find(pairs, type,
auto it = std::ranges::find(pairs, type,
[](const auto& pair) { return pair.first; });
CHECK(it != pairs.end());
if (value.empty()) {
@ -421,7 +420,7 @@ std::unique_ptr<FormStructure> ConstructShippingAndBillingFormStructure() {
TypeValuePairs a = GetDefaultProfileTypeValuePairs();
TypeValuePairs b = GetSecondProfileTypeValuePairs();
a.reserve(a.size() + b.size());
base::ranges::move(b, std::back_inserter(a));
std::ranges::move(b, std::back_inserter(a));
return ConstructFormStructureFromTypeValuePairs(a);
}
@ -443,7 +442,7 @@ FormData ConstructDefaultFormDataWithTwoAddresses() {
TypeValuePairs a = GetDefaultProfileTypeValuePairs();
TypeValuePairs b = GetSecondProfileTypeValuePairs();
a.reserve(a.size() + b.size());
base::ranges::move(b, std::back_inserter(a));
std::ranges::move(b, std::back_inserter(a));
return ConstructFormDateFromTypeValuePairs(a);
}

@ -8,13 +8,13 @@
// components/autofill/core/browser/autofill_regexes_unittest.cc.
// Only these tests will be kept once the pattern provider launches.
#include <ranges>
#include <string>
#include <string_view>
#include <vector>
#include "base/containers/flat_set.h"
#include "base/logging.h"
#include "base/ranges/ranges.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/form_parsing/buildflags.h"
#include "components/autofill/core/browser/form_parsing/regex_patterns_inl.h"

@ -12,7 +12,6 @@
#include "base/check.h"
#include "base/feature_list.h"
#include "base/ranges/algorithm.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_regexes.h"
@ -56,7 +55,7 @@ void MaybeRemoveAffix(base::span<std::u16string_view> strings,
if (std::ranges::all_of(strings, [&](std::u16string_view s) {
return IsValidParseableName(RemoveAffix(s));
})) {
base::ranges::transform(strings, strings.begin(), RemoveAffix);
std::ranges::transform(strings, strings.begin(), RemoveAffix);
}
}

@ -30,7 +30,6 @@
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
@ -475,7 +474,7 @@ bool FormStructure::ShouldUploadUkm(bool require_classified_field) const {
field->html_type() != HtmlFieldType::kUnspecified);
};
size_t num_text_fields = base::ranges::count_if(
size_t num_text_fields = std::ranges::count_if(
fields(), require_classified_field ? is_focusable_predicted_text_field
: is_focusable_text_field);
if (num_text_fields == 0) {
@ -486,7 +485,7 @@ bool FormStructure::ShouldUploadUkm(bool require_classified_field) const {
// "search" in its name/id/placeholder, the function return false and the form
// is not recorded into UKM. The form is considered a search box.
if (num_text_fields == 1) {
auto it = base::ranges::find_if(
auto it = std::ranges::find_if(
fields(), require_classified_field ? is_focusable_predicted_text_field
: is_focusable_text_field);
if (base::ToLowerASCII((*it)->placeholder()).find(u"search") !=
@ -831,7 +830,7 @@ size_t FormStructure::field_count() const {
}
const AutofillField* FormStructure::GetFieldById(FieldGlobalId field_id) const {
auto it = base::ranges::find(
auto it = std::ranges::find(
fields_, field_id, [](const auto& field) { return field->global_id(); });
return it != fields_.end() ? it->get() : nullptr;
}

@ -50,7 +50,7 @@ std::vector<std::unique_ptr<AutofillField>> CreateFields(
std::vector<FieldType> GetTypes(
const std::vector<std::unique_ptr<AutofillField>>& fields) {
std::vector<FieldType> server_types;
base::ranges::transform(
std::ranges::transform(
fields, std::back_inserter(server_types),
[](const auto& field) { return field->Type().GetStorableType(); });
return server_types;

@ -4,8 +4,9 @@
#include "components/autofill/core/browser/form_structure_rationalizer.h"
#include <algorithm>
#include "base/containers/contains.h"
#include "base/ranges/algorithm.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/form_parsing/autofill_parsing_utils.h"
#include "components/autofill/core/browser/form_parsing/credit_card_field_parser.h"

@ -4,11 +4,11 @@
#include "components/autofill/core/browser/form_structure_sectioning_util.h"
#include <algorithm>
#include <iterator>
#include <memory>
#include <utility>
#include "base/ranges/algorithm.h"
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/field_types.h"
@ -70,7 +70,7 @@ bool IsSectionable(const AutofillField& field) {
void AssignCreditCardSections(
base::span<const std::unique_ptr<AutofillField>> fields,
base::flat_map<LocalFrameToken, size_t>& frame_token_ids) {
auto first_cc_field = base::ranges::find_if(
auto first_cc_field = std::ranges::find_if(
fields, [](const std::unique_ptr<AutofillField>& field) {
return field->Type().group() == FieldTypeGroup::kCreditCard &&
!field->section();

@ -12,7 +12,6 @@
#include "base/containers/to_vector.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/ranges/algorithm.h"
#include "base/time/time.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h"

@ -493,7 +493,7 @@ bool AutofillManager::GetCachedFormAndField(
}
*form_structure = cached_form;
auto field_it =
base::ranges::find(*cached_form, field_id, &AutofillField::global_id);
std::ranges::find(*cached_form, field_id, &AutofillField::global_id);
*autofill_field = field_it == cached_form->end() ? nullptr : field_it->get();
return *autofill_field != nullptr;
}
@ -609,7 +609,7 @@ void AutofillManager::ParseFormsAsync(
// Remove duplicates by their FormGlobalId. Otherwise, after moving the forms
// into `form_structures_`, duplicates may be destroyed and we'd end up with
// dangling pointers.
base::ranges::sort(form_structures, {}, &FormStructure::global_id);
std::ranges::sort(form_structures, {}, &FormStructure::global_id);
auto repeated =
std::ranges::unique(form_structures, {}, &FormStructure::global_id);
form_structures.erase(repeated.begin(), repeated.end());

@ -4,13 +4,13 @@
#include "components/autofill/core/browser/foundations/autofill_manager.h"
#include <algorithm>
#include <iterator>
#include <memory>
#include <tuple>
#include <vector>
#include "base/containers/to_vector.h"
#include "base/ranges/algorithm.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
@ -119,7 +119,7 @@ auto HaveSameFormIdAs(const FormData& form) {
auto HaveSameFormIdsAs(const std::vector<FormData>& forms) {
std::vector<decltype(HaveSameFormIdAs(forms.front()))> matchers;
matchers.reserve(forms.size());
base::ranges::transform(forms, std::back_inserter(matchers),
std::ranges::transform(forms, std::back_inserter(matchers),
&HaveSameFormIdAs);
return UnorderedElementsAreArray(matchers);
}

@ -7,6 +7,7 @@
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <array>
#include <iterator>
#include <limits>
@ -47,7 +48,6 @@
#include "base/metrics/user_metrics_action.h"
#include "base/notreached.h"
#include "base/path_service.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"
@ -406,7 +406,7 @@ void LogSuggestionsCount(const SuggestionsContext& context,
context.is_context_secure);
// TODO(crbug.com/41484171): Move to payments_suggestion_generator.cc.
autofill_metrics::LogSuggestionsCount(
base::ranges::count_if(suggestions,
std::ranges::count_if(suggestions,
[](const Suggestion& suggestion) {
return GetFillingProductFromSuggestionType(
suggestion.type) ==
@ -417,7 +417,7 @@ void LogSuggestionsCount(const SuggestionsContext& context,
if (context.filling_product == FillingProduct::kAddress) {
// TODO(crbug.com/41484171): Move to address_suggestion_generator.cc.
autofill_metrics::LogSuggestionsCount(
base::ranges::count_if(suggestions,
std::ranges::count_if(suggestions,
[](const Suggestion& suggestion) {
return GetFillingProductFromSuggestionType(
suggestion.type) ==
@ -548,7 +548,7 @@ GetFieldTypeGroupsFromFormStructure(const FormStructure* form_structure) {
// using a plus profile.
bool WasEmailOverrideAppliedOnSuggestions(
const std::vector<Suggestion>& address_suggestions) {
return base::ranges::any_of(
return std::ranges::any_of(
address_suggestions, [](const Suggestion& suggestion) {
const Suggestion::AutofillProfilePayload* profile_payload =
absl::get_if<Suggestion::AutofillProfilePayload>(

@ -4,6 +4,7 @@
#include "components/autofill/core/browser/foundations/browser_autofill_manager.h"
#include <algorithm>
#include <cstddef>
#include <memory>
#include <optional>
@ -20,7 +21,6 @@
#include "base/memory/ref_counted.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/metrics_hashes.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@ -1158,7 +1158,7 @@ class BrowserAutofillManagerTest : public testing::Test {
FormData result_form = input_form;
// Copy the filled data into the form.
for (FormFieldData& field : test_api(result_form).fields()) {
if (auto it = base::ranges::find(filled_fields, field.global_id(),
if (auto it = std::ranges::find(filled_fields, field.global_id(),
&FormFieldData::global_id);
it != filled_fields.end()) {
field = *it;
@ -3399,7 +3399,7 @@ class BrowserAutofillManagerWithLogEventsTest
template <class T>
size_t CountEventOfType(
const std::vector<AutofillField::FieldLogEventType>& events) {
return base::ranges::count_if(events, [](const auto& event) {
return std::ranges::count_if(events, [](const auto& event) {
return absl::holds_alternative<T>(event);
});
}
@ -4674,7 +4674,7 @@ void DoTestFormSubmittedNonAddressControlWithDefaultValue(
// Remove phone number field.
auto phonenumber_it =
base::ranges::find(form.fields(), u"phonenumber", &FormFieldData::name);
std::ranges::find(form.fields(), u"phonenumber", &FormFieldData::name);
ASSERT_TRUE(phonenumber_it != form.fields().end());
test_api(form).fields().erase(phonenumber_it);

@ -4,6 +4,7 @@
#include "components/autofill/core/browser/foundations/form_forest.h"
#include <algorithm>
#include <limits>
#include <memory>
#include <optional>
@ -18,7 +19,6 @@
#include "base/metrics/histogram_macros.h"
#include "base/not_fatal_until.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "components/autofill/core/browser/foundations/form_forest_util_inl.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
@ -54,7 +54,7 @@ FormData* FormForest::GetFormData(FormGlobalId form, FrameData* frame_data) {
if (!frame_data) {
return nullptr;
}
auto it = base::ranges::find(frame_data->child_forms, form.renderer_id,
auto it = std::ranges::find(frame_data->child_forms, form.renderer_id,
&FormData::renderer_id);
return it != frame_data->child_forms.end() ? &*it : nullptr;
}
@ -63,7 +63,7 @@ FormForest::FrameAndForm FormForest::GetRoot(FormGlobalId form) {
for (;;) {
FrameData* frame = GetFrameData(form.frame_token);
if (!frame->parent_form) {
auto it = base::ranges::find(frame->child_forms, form.renderer_id,
auto it = std::ranges::find(frame->child_forms, form.renderer_id,
&FormData::renderer_id);
CHECK(it != frame->child_forms.end());
return {raw_ref(*frame), raw_ref(*it)};
@ -550,7 +550,7 @@ FormForest::RendererForms FormForest::GetRendererFormsOfBrowserFields(
// Finds or creates the renderer form from which `browser_field` originated.
// The form with `form_id` may have been removed from the tree, for example,
// between a fill and a refill.
auto renderer_form = base::ranges::find(result.renderer_forms.rbegin(),
auto renderer_form = std::ranges::find(result.renderer_forms.rbegin(),
result.renderer_forms.rend(),
form_id, &FormData::global_id);
if (renderer_form == result.renderer_forms.rend()) {

@ -217,7 +217,7 @@ std::vector<std::vector<T>> Permutations(const std::vector<T>& xs) {
std::vector<std::vector<T>> ps;
ps.reserve(factorial(xs.size()));
ps.push_back(xs);
base::ranges::sort(ps.front());
std::ranges::sort(ps.front());
while (std::ranges::next_permutation(ps.front()).found) {
ps.push_back(ps.front());
}
@ -495,7 +495,7 @@ class FormForestTestWithMockedTree : public FormForestTest {
if (f.begin + f.count > source.fields().size()) {
f.count = base::dynamic_extent;
}
base::ranges::copy(base::span(source.fields()).subspan(f.begin, f.count),
std::ranges::copy(base::span(source.fields()).subspan(f.begin, f.count),
std::back_inserter(fields));
}
@ -520,7 +520,7 @@ class FormForestTestWithMockedTree : public FormForestTest {
FakeAutofillDriver& d = GetDriverOfForm(fs.form);
return !d.GetParent() || d.is_sub_root();
};
auto it = base::ranges::find_if(form_fields, IsRoot);
auto it = std::ranges::find_if(form_fields, IsRoot);
CHECK(it != form_fields.end());
CHECK(std::ranges::all_of(form_fields, [&](FormSpan fs) {
return !IsRoot(fs) || fs.form == it->form;

@ -18,13 +18,13 @@ namespace internal {
// At most |r1| * |r2| comparisons.
// At most |r2| comparisons if |r1| is a subsequence of |r2|.
//
// Unlike for base::ranges::set_difference, |r1| and |r2| do not need to be
// Unlike for std::ranges::set_difference, |r1| and |r2| do not need to be
// sorted. Aside from the order of the |fun| calls,
// base::ranges::sort(r1, {}, proj);
// base::ranges::sort(r2, {}, proj);
// std::ranges::sort(r1, {}, proj);
// std::ranges::sort(r2, {}, proj);
// std::vector<decltype(fun(T()))> diff;
// base::ranges::set_difference(r1, r2, std::back_inserter(diff), {}, proj);
// base::ranges::for_each(diff, fun);
// std::ranges::set_difference(r1, r2, std::back_inserter(diff), {}, proj);
// std::ranges::for_each(diff, fun);
// is equivalent to
// for_each_in_set_difference(r1, r2, fun, proj).
//

@ -405,7 +405,7 @@ const FormStructure* WaitForMatchingForm(
}
FormStructure* FindForm() const {
auto it = base::ranges::find_if(
auto it = std::ranges::find_if(
manager_->form_structures(),
[&](const auto& p) { return pred_.Run(*p.second); });
return it != manager_->form_structures().end() ? it->second.get()

@ -4,6 +4,7 @@
#include "components/autofill/core/browser/geo/alternative_state_name_map_updater.h"
#include <algorithm>
#include <memory>
#include <string>
#include <vector>
@ -14,7 +15,6 @@
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/sequenced_task_runner.h"

@ -6,12 +6,12 @@
#include <stddef.h>
#include <algorithm>
#include <string>
#include <string_view>
#include <utility>
#include "base/containers/fixed_flat_map.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@ -84,7 +84,7 @@ std::u16string_view GetAbbreviationForName(std::u16string_view name) {
std::u16string_view GetNameForAbbreviation(std::u16string_view abbreviation) {
using Member = decltype(kStateData)::value_type;
auto it = base::ranges::find(kStateData, base::ToLowerASCII(abbreviation),
auto it = std::ranges::find(kStateData, base::ToLowerASCII(abbreviation),
&Member::second);
return it != kStateData.end() ? it->first : std::u16string_view();
}

@ -772,7 +772,7 @@ std::string GenerateTestName(
std::string name = info.param.BaseName()
.ReplaceExtension(FILE_PATH_LITERAL(""))
.MaybeAsASCII();
base::ranges::replace_if(name, [](char c) { return !std::isalnum(c); }, '_');
std::ranges::replace_if(name, [](char c) { return !std::isalnum(c); }, '_');
return name;
}

@ -4,8 +4,9 @@
#include "components/autofill/core/browser/integrators/autofill_optimization_guide.h"
#include <algorithm>
#include "base/containers/flat_set.h"
#include "base/ranges/algorithm.h"
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/data_manager/payments/payments_data_manager.h"
#include "components/autofill/core/browser/data_model/credit_card.h"

@ -4,9 +4,9 @@
#include "components/autofill/core/browser/integrators/autofill_optimization_guide.h"
#include <algorithm>
#include <memory>
#include "base/ranges/algorithm.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/autofill/core/browser/country_type.h"

@ -4,9 +4,10 @@
#include "components/autofill/core/browser/logging/text_log_receiver.h"
#include <algorithm>
#include "base/logging.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
namespace autofill {
@ -91,7 +92,7 @@ std::vector<std::string> RenderEntries(const base::Value::List& entries) {
for (const base::Value& entry : entries) {
DCHECK(entry.is_dict());
std::vector<std::string> rendered_entry = RenderEntry(entry.GetDict());
base::ranges::move(rendered_entry, std::back_inserter(result));
std::ranges::move(rendered_entry, std::back_inserter(result));
}
return result;
}

@ -159,7 +159,7 @@ std::optional<CreditCard> MakeCard(const base::Value::Dict& dict) {
// collecting all GUIDs to remove first.
void RemoveAllExistingProfiles(AddressDataManager& adm) {
std::vector<std::string> existing_guids;
base::ranges::transform(adm.GetProfiles(), std::back_inserter(existing_guids),
std::ranges::transform(adm.GetProfiles(), std::back_inserter(existing_guids),
&AutofillProfile::guid);
for (const std::string& guid : existing_guids) {
adm.RemoveProfile(guid);

@ -750,7 +750,7 @@ void AutofillMetrics::LogStoredCreditCardMetrics(
}
// Log the number of server cards that are enrolled with virtual cards.
size_t virtual_card_enabled_card_count = base::ranges::count_if(
size_t virtual_card_enabled_card_count = std::ranges::count_if(
server_cards, [](const std::unique_ptr<CreditCard>& card) {
return card->virtual_card_enrollment_state() ==
CreditCard::VirtualCardEnrollmentState::kEnrolled;

@ -5267,7 +5267,7 @@ class AutofillMetricsCrossFrameFormTest : public AutofillMetricsTest {
}
FormFieldData& GetFieldById(FieldGlobalId field) {
auto it = base::ranges::find(test_api(form_).fields(), field,
auto it = std::ranges::find(test_api(form_).fields(), field,
&FormFieldData::global_id);
CHECK(it != form_.fields().end());
return *it;

@ -4,6 +4,7 @@
#include "components/autofill/core/browser/metrics/form_events/credit_card_form_event_logger.h"
#include <algorithm>
#include <string>
#include "base/containers/contains.h"
@ -11,7 +12,6 @@
#include "base/metrics/histogram_functions.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/types/cxx23_to_underlying.h"
#include "components/autofill/core/browser/data_manager/payments/payments_data_manager.h"

@ -1685,7 +1685,7 @@ INSTANTIATE_TEST_SUITE_P(
[](const testing::TestParamInfo<
LogFocusedComplexFormAtFormRemoveTest::ParamType>& info) {
std::string name = info.param.test_name;
base::ranges::replace_if(
std::ranges::replace_if(
name, [](char c) { return !std::isalnum(c); }, '_');
return name;
});

@ -4,10 +4,11 @@
#include "components/autofill/core/browser/metrics/placeholder_metrics.h"
#include <algorithm>
#include "base/containers/adapters.h"
#include "base/hash/hash.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/field_types.h"

@ -98,7 +98,7 @@ void LogDurationMetrics(const FormStructure& form,
base::TimeTicks interaction_time,
base::TimeTicks submission_time) {
size_t num_detected_field_types =
base::ranges::count_if(form, &FieldHasMeaningfulPossibleFieldTypes,
std::ranges::count_if(form, &FieldHasMeaningfulPossibleFieldTypes,
&std::unique_ptr<AutofillField>::operator*);
bool form_has_autofilled_fields = std::ranges::any_of(
form, [](const auto& field) { return field->is_autofilled(); });

@ -4,9 +4,10 @@
#include "components/autofill/core/browser/metrics/quality_metrics_filling.h"
#include <algorithm>
#include "base/containers/fixed_flat_set.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/metrics/autofill_metrics_utils.h"

@ -4,10 +4,10 @@
#include "components/autofill/core/browser/metrics/stored_profile_metrics.h"
#include <algorithm>
#include <functional>
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "components/autofill/core/browser/data_model/autofill_profile_comparator.h"
#include "components/autofill/core/browser/field_types.h"
@ -94,7 +94,7 @@ void LogLocalProfileSupersetMetrics(
// profile.
base::UmaHistogramCounts100(
"Autofill.Leipzig.Duplication.NumberOfLocalSupersetProfilesOnStartup",
base::ranges::count_if(profiles.begin(), account_profiles.begin(),
std::ranges::count_if(profiles.begin(), account_profiles.begin(),
[&](const AutofillProfile* local_profile) {
return is_account_superset(local_profile);
}));

@ -4,10 +4,11 @@
#include "components/autofill/core/browser/metrics/suggestions_list_metrics.h"
#include <algorithm>
#include "base/metrics/histogram_functions.h"
#include "base/metrics/user_metrics.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "components/autofill/core/browser/filling/filling_product.h"
#include "components/autofill/core/browser/metrics/autofill_metrics.h"

@ -128,7 +128,7 @@ FieldClassificationModelEncoder::EncodeField(const AutofillField& field) const {
output.emplace_back(cls_token());
for (int feature : encoding_parameters_.features()) {
base::ranges::move(encode(feature), std::back_inserter(output));
std::ranges::move(encode(feature), std::back_inserter(output));
}
// Pad the remaining space, if any, with zeroes.
@ -170,7 +170,7 @@ FieldClassificationModelEncoder::EncodeFormFeatures(
output.emplace_back(form_cls_token());
for (int feature : encoding_parameters_.form_features()) {
base::ranges::move(encode(feature), std::back_inserter(output));
std::ranges::move(encode(feature), std::back_inserter(output));
}
// Pad the remaining space, if any, with zeroes.

@ -9,9 +9,9 @@
#include "components/autofill/core/browser/ml_model/field_classification_model_executor.h"
#include <algorithm>
#include <vector>
#include "base/ranges/algorithm.h"
#include "components/autofill/core/browser/ml_model/field_classification_model_encoder.h"
#include "third_party/tflite/src/tensorflow/lite/kernels/internal/tensor_ctypes.h"
@ -42,7 +42,7 @@ bool FieldClassificationModelExecutor::Preprocess(
empty_field);
for (size_t i = 0; i < fields_count; ++i) {
base::ranges::transform(
std::ranges::transform(
input[i], encoded_input[i].begin(),
[](FieldClassificationModelEncoder::TokenId token_id) {
return token_id.value();
@ -50,7 +50,7 @@ bool FieldClassificationModelExecutor::Preprocess(
}
// Populate tensors with the vectorized field labels.
for (size_t i = 0; i < maximum_number_of_fields; ++i) {
base::ranges::copy(encoded_input[i],
std::ranges::copy(encoded_input[i],
tflite::GetTensorData<float>(input_tensors[0]) +
i * output_sequence_length);
}
@ -87,7 +87,7 @@ FieldClassificationModelExecutor::Postprocess(
model_predictions[i].resize(num_outputs);
const float* data_bgn =
tflite::GetTensorData<float>(output_tensors[0]) + i * num_outputs;
base::ranges::copy(data_bgn, data_bgn + num_outputs,
std::ranges::copy(data_bgn, data_bgn + num_outputs,
model_predictions[i].begin());
}
return model_predictions;

@ -10,7 +10,6 @@
#include "base/barrier_callback.h"
#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/ranges/algorithm.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/form_structure.h"
#include "components/autofill/core/browser/heuristic_source.h"
@ -47,7 +46,7 @@ bool AllFieldsClassifiedWithConfidence(
size_t num_fields,
float confidence_threshold) {
for (size_t i = 0; i < num_fields; i++) {
if (base::ranges::max(output[i]) < confidence_threshold) {
if (std::ranges::max(output[i]) < confidence_threshold) {
return false;
}
}
@ -212,8 +211,7 @@ void FieldClassificationModelHandler::AssignMostLikelyTypes(
std::pair<FieldType, float> FieldClassificationModelHandler::GetMostLikelyType(
const std::vector<float>& model_output) const {
CHECK(state_);
int max_index =
base::ranges::max_element(model_output) - model_output.begin();
int max_index = std::ranges::max_element(model_output) - model_output.begin();
CHECK_LT(max_index, state_->metadata.output_type_size());
if (!state_->metadata.postprocessing_parameters()
.has_confidence_threshold_per_field() ||

@ -4,10 +4,11 @@
#include "components/autofill/core/browser/payments/autofill_offer_manager.h"
#include <ranges>
#include "base/check_deref.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/ranges/ranges.h"
#include "components/autofill/core/browser/data_manager/payments/payments_data_manager.h"
#include "components/autofill/core/browser/data_manager/personal_data_manager.h"
#include "components/autofill/core/browser/data_model/autofill_offer_data.h"

Some files were not shown because too many files have changed in this diff Show More