Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Unified Diff: components/password_manager/core/browser/password_store.cc

Issue 2774653006: Refactor Password Manager to use base::EraseIf (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/password_manager/core/browser/password_manager_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_store.cc
diff --git a/components/password_manager/core/browser/password_store.cc b/components/password_manager/core/browser/password_store.cc
index b9f7f2b66bb1390fa00a98c2ab2bdeff32f1ec08..6ccfaad337dde5bf507a93e4d39521aa738c5082 100644
--- a/components/password_manager/core/browser/password_store.cc
+++ b/components/password_manager/core/browser/password_store.cc
@@ -38,13 +38,10 @@ PasswordStore::GetLoginsRequest::~GetLoginsRequest() {
void PasswordStore::GetLoginsRequest::NotifyConsumerWithResults(
std::vector<std::unique_ptr<PasswordForm>> results) {
if (!ignore_logins_cutoff_.is_null()) {
- results.erase(
- std::remove_if(results.begin(), results.end(),
- [this](const std::unique_ptr<PasswordForm>& credential) {
- return (credential->date_created <
- ignore_logins_cutoff_);
- }),
- results.end());
+ base::EraseIf(results,
+ [this](const std::unique_ptr<PasswordForm>& credential) {
+ return (credential->date_created < ignore_logins_cutoff_);
+ });
}
origin_task_runner_->PostTask(
« no previous file with comments | « components/password_manager/core/browser/password_manager_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698