0

Replace erase(remove_if(...)) with base::EraseIf(...).

Change-Id: Ibf5307d5ff807e3403d6e01e6ea9878fe07cae2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3067681
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#908186}
This commit is contained in:
cfredric
2021-08-03 23:12:57 +00:00
committed by Chromium LUCI CQ
parent 8e40d35bdc
commit 2c4c773e21

@ -194,12 +194,9 @@ void FirstPartySets::ApplyManuallySpecifiedSet() {
// Erase the intersection between the manually-specified set and the
// CU-supplied set, and any members whose owner was in the intersection.
sets_.erase(base::ranges::remove_if(sets_,
[&was_manually_provided](const auto& p) {
return was_manually_provided(p.first) ||
was_manually_provided(p.second);
}),
sets_.end());
base::EraseIf(sets_, [&was_manually_provided](const auto& p) {
return was_manually_provided(p.first) || was_manually_provided(p.second);
});
// Now remove singleton sets. We already removed any sites that were part
// of the intersection, or whose owner was part of the intersection. This
@ -210,13 +207,9 @@ void FirstPartySets::ApplyManuallySpecifiedSet() {
if (it.first != it.second)
owners_with_members.insert(it.second);
}
sets_.erase(base::ranges::remove_if(
sets_,
[&owners_with_members](const auto& p) {
return p.first == p.second &&
!base::Contains(owners_with_members, p.first);
}),
sets_.end());
base::EraseIf(sets_, [&owners_with_members](const auto& p) {
return p.first == p.second && !base::Contains(owners_with_members, p.first);
});
// Next, we must add the manually-added set to the parsed value.
for (const net::SchemefulSite& member : manual_members) {