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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 2211193002: Disable autocomplete with unknown autocomplete attribute value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits Created 4 years, 4 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/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index 3e353ee53aa9f97b562d1ae3ba6e555586db152c..fe5bb7cc87ed42558b27cb21a4d6dc647d4b48c1 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -583,11 +583,12 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
// If there are no Autofill suggestions, consider showing Autocomplete
// suggestions. We will not show Autocomplete suggestions for a field that
- // specifies autocomplete=off or a field that we think is a credit card
- // expiration, cvc or number.
+ // specifies autocomplete=off (or an unrecognized type) or a field that we
+ // think is a credit card expiration, cvc or number.
if (suggestions.empty() && field.should_autocomplete &&
!(autofill_field &&
(IsCreditCardExpirationType(autofill_field->Type().GetStorableType()) ||
+ autofill_field->Type().html_type() == HTML_TYPE_UNRECOGNIZED ||
autofill_field->Type().GetStorableType() == CREDIT_CARD_NUMBER ||
autofill_field->Type().GetStorableType() ==
CREDIT_CARD_VERIFICATION_CODE))) {
« no previous file with comments | « components/autofill/core/browser/autofill_manager.h ('k') | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698