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

Unified Diff: components/autofill/content/browser/request_autocomplete_manager.cc

Issue 309063006: Do not autofill element when there is no autofill suggestion from profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark is_autofilled property for autocomplete formdata result. Created 6 years, 6 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/content/browser/request_autocomplete_manager.cc
diff --git a/components/autofill/content/browser/request_autocomplete_manager.cc b/components/autofill/content/browser/request_autocomplete_manager.cc
index cf4712bf6fa2c97cf97bea24613b66ab38cbdacb..b1e5353e2cac1cd3ff47c72fcef9b5aaf10f9680 100644
--- a/components/autofill/content/browser/request_autocomplete_manager.cc
+++ b/components/autofill/content/browser/request_autocomplete_manager.cc
@@ -76,11 +76,20 @@ void RequestAutocompleteManager::ReturnAutocompleteResult(
if (!host)
return;
+ FormData form_data = FormData();
Ilya Sherman 2014/06/06 04:19:07 nit: No need for the "= FormData()".
+ if (form_structure) {
+ form_data = form_structure->ToFormData();
+ for (size_t i = 0; i < form_data.fields.size(); ++i) {
+ if(!form_data.fields[i].value.empty())
+ form_data.fields[i].is_autofilled = true;
+ }
+ }
+
host->Send(new AutofillMsg_RequestAutocompleteResult(
host->GetRoutingID(),
ToWebkitAutocompleteResult(result),
debug_message,
- form_structure ? form_structure->ToFormData() : FormData()));
+ form_data));
}
void RequestAutocompleteManager::ShowRequestAutocompleteDialog(
« no previous file with comments | « chrome/renderer/autofill/form_autofill_browsertest.cc ('k') | components/autofill/content/renderer/form_autofill_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698