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

Unified Diff: components/autofill/content/renderer/password_generation_agent.cc

Issue 2972333002: autofill : Use ContainsValue() instead of std::find() in components/autofill (Closed)
Patch Set: add base/stl_util.h Created 3 years, 5 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
Index: components/autofill/content/renderer/password_generation_agent.cc
diff --git a/components/autofill/content/renderer/password_generation_agent.cc b/components/autofill/content/renderer/password_generation_agent.cc
index e7986765a8e42dcc5699bd0ad4950641937daf1f..31634b573252dcdc9518903d5ec5a812dcba8457 100644
--- a/components/autofill/content/renderer/password_generation_agent.cc
+++ b/components/autofill/content/renderer/password_generation_agent.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/stl_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/autofill/content/renderer/form_autofill_util.h"
#include "components/autofill/content/renderer/form_classifier.h"
@@ -58,7 +59,7 @@ bool GetAccountCreationPasswordFields(
}
bool ContainsURL(const std::vector<GURL>& urls, const GURL& url) {
- return std::find(urls.begin(), urls.end(), url) != urls.end();
+ return base::ContainsValue(urls, url);
}
// Calculates the signature of |form| and searches it in |forms|.
« no previous file with comments | « components/autofill/content/renderer/form_autofill_util.cc ('k') | components/autofill/core/browser/address.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698