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 48cd5974c206b50c064630dace3cb85731b24497..42c79266f38acae1ee030928380d5709df675370 100644 |
--- a/components/autofill/core/browser/autofill_manager.cc |
+++ b/components/autofill/core/browser/autofill_manager.cc |
@@ -530,12 +530,19 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id, |
} |
} |
- // Add the results from AutoComplete. They come back asynchronously, so we |
- // hand off what we generated and they will send the results back to the |
- // renderer. |
- autocomplete_history_manager_->OnGetAutocompleteSuggestions( |
- query_id, field.name, field.value, field.form_control_type, values, |
- labels, icons, unique_ids); |
+ if (field.should_autocomplete) { |
+ // Add the results from AutoComplete. They come back asynchronously, so we |
+ // hand off what we generated and they will send the results back to the |
+ // renderer. |
+ autocomplete_history_manager_->OnGetAutocompleteSuggestions( |
groby-ooo-7-16
2014/10/20 22:52:31
Question: OnGetAutocompleteSuggestions also cancel
Evan Stade
2014/10/20 23:01:54
good call, we should probably do autocomplete_hist
|
+ query_id, field.name, field.value, field.form_control_type, values, |
+ labels, icons, unique_ids); |
+ } else { |
+ // Autocomplete is disabled for this field; only pass back Autofill |
+ // suggestions. |
+ external_delegate_->OnSuggestionsReturned( |
+ query_id, values, labels, icons, unique_ids); |
+ } |
} |
void AutofillManager::FillOrPreviewForm( |