Chromium Code Reviews| 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 6896ed6017b93dc4bfb4e9388625db8ddb731bfb..d64eca98160b3547488c0c832da922fba7f6af98 100644 |
| --- a/components/autofill/core/browser/autofill_manager.cc |
| +++ b/components/autofill/core/browser/autofill_manager.cc |
| @@ -606,9 +606,11 @@ 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 an unrecognized type) or a field that we |
| - // think is a credit card expiration, cvc or number. |
| - if (suggestions.empty() && field.should_autocomplete && |
| + // specifies autocomplete=off (or an unrecognized type), a field for which we |
| + // will show the credit card signin promo, or a field that we think is a |
| + // credit card expiration, cvc or number. |
| + if (suggestions.empty() && !ShouldShowCreditCardSigninPromo(form, field) && |
|
sebsg
2016/11/01 21:31:15
Do you think you could add a test for that?
Mathieu
2016/11/02 21:01:04
Certainly can!
|
| + field.should_autocomplete && |
| !(autofill_field && |
| (IsCreditCardExpirationType(autofill_field->Type().GetStorableType()) || |
| autofill_field->Type().html_type() == HTML_TYPE_UNRECOGNIZED || |