Index: ios/chrome/browser/passwords/password_generation_agent.mm |
diff --git a/ios/chrome/browser/passwords/password_generation_agent.mm b/ios/chrome/browser/passwords/password_generation_agent.mm |
index 67671677d07eeb5e1f7dfb59827b3b2c9ee849c7..bd82af31335b07f4a13b5ff4ce28bbdffca2f1cd 100644 |
--- a/ios/chrome/browser/passwords/password_generation_agent.mm |
+++ b/ios/chrome/browser/passwords/password_generation_agent.mm |
@@ -8,6 +8,7 @@ |
#include "base/mac/foundation_util.h" |
#include "base/mac/scoped_block.h" |
+#include "base/stl_util.h" |
#include "base/strings/sys_string_conversions.h" |
#include "base/strings/utf_string_conversions.h" |
#include "components/autofill/core/browser/password_generator.h" |
@@ -42,11 +43,6 @@ const int kGeneratedPasswordLength = 20; |
// an account creation form. |
const size_t kMinimumTextFieldsForAccountCreation = 3; |
-// Returns true if |urls| contains |url|. |
-bool VectorContainsURL(const std::vector<GURL>& urls, const GURL& url) { |
- return std::find(urls.begin(), urls.end(), url) != urls.end(); |
-} |
- |
// Returns whether |field| should be considered a text field. Implementation |
// mirrors that of password_controller.js. |
// TODO(crbug.com/433856): Figure out how to determine if |field| is visible. |
@@ -292,7 +288,7 @@ passwordManagerDriver:(password_manager::PasswordManagerDriver*)driver |
// password manager, wait. |
GURL origin = _possibleAccountCreationForm->origin; |
if (!experimental_flags::UseOnlyLocalHeuristicsForPasswordGeneration()) { |
- if (!VectorContainsURL(_allowedGenerationFormOrigins, origin)) |
+ if (!base::ContainsValue(_allowedGenerationFormOrigins, origin)) |
return; |
} |