X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcomponents%2Fautofill%2Fcore%2Fbrowser%2Fautofill_manager.cc;h=d685ff79ab9614540f94558590dc01193997049f;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=48cd5974c206b50c064630dace3cb85731b24497;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/components/autofill/core/browser/autofill_manager.cc b/src/components/autofill/core/browser/autofill_manager.cc index 48cd597..d685ff7 100644 --- a/src/components/autofill/core/browser/autofill_manager.cc +++ b/src/components/autofill/core/browser/autofill_manager.cc @@ -493,8 +493,9 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id, // provide credit card suggestions for non-HTTPS pages. However, provide a // warning to the user in these cases. int warning = 0; - if (is_filling_credit_card && !FormIsHTTPS(*form_structure)) + if (is_filling_credit_card && !FormIsHTTPS(*form_structure)) { warning = IDS_AUTOFILL_WARNING_INSECURE_CONNECTION; + } if (warning) { values.assign(1, l10n_util::GetStringUTF16(warning)); labels.assign(1, base::string16()); @@ -530,12 +531,20 @@ 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( + 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. + autocomplete_history_manager_->CancelPendingQuery(); + external_delegate_->OnSuggestionsReturned( + query_id, values, labels, icons, unique_ids); + } } void AutofillManager::FillOrPreviewForm(