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

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

Issue 667043002: Add a flag to ignore autocomplete="off" for Autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: fix MSVC error C4373 Created 6 years, 2 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/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index e67f87572d479ef1f272d6b0267203cfc929a02b..0a9b57fd13bf442ea9e3720934c9adf3248a8dc1 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -632,9 +632,15 @@ void AutofillAgent::QueryAutofillSuggestions(
// warning. Otherwise, we want to ignore fields that disable autocomplete, so
// that the suggestions list does not include suggestions for these form
// fields -- see comment 1 on http://crbug.com/69914
- const RequirementsMask requirements =
+ RequirementsMask requirements =
element.autoComplete() ? REQUIRE_AUTOCOMPLETE : REQUIRE_NONE;
+ // If we're ignoring autocomplete="off", always extract everything.
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kIgnoreAutocompleteOffForAutofill)) {
+ requirements = REQUIRE_NONE;
+ }
+
FormData form;
FormFieldData field;
if (!FindFormAndFieldForFormControlElement(element, &form, &field,
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | components/autofill/content/renderer/form_autofill_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698