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 c1e219eeb455e198b60b6cd2b0ceed66acb72bde..0794c8257df0d2c49844614e20b53365592d5c85 100644 |
| --- a/components/autofill/core/browser/autofill_manager.cc |
| +++ b/components/autofill/core/browser/autofill_manager.cc |
| @@ -550,10 +550,14 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id, |
| } |
| } |
| - if (suggestions.empty() && field.should_autocomplete) { |
| - // Show autocomplete. Suggestions come back asynchronously, so the |
| - // autocomplete manager will handle sending the results back to the |
| - // renderer. |
| + // 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 field. |
| + if (suggestions.empty() && field.should_autocomplete && |
| + !(autofill_field && |
| + autofill_field->Type().group() == CREDIT_CARD)) { |
|
Justin Donnelly
2016/04/26 21:19:00
How about carving out an exception for Type() == C
Mathieu
2016/04/27 15:31:28
Sure, I went with restricting the exclusion to CVC
|
| + // Suggestions come back asynchronously, so the Autocomplete manager will |
| + // handle sending the results back to the renderer. |
| autocomplete_history_manager_->OnGetAutocompleteSuggestions( |
| query_id, field.name, field.value, field.form_control_type); |
| return; |