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

Unified Diff: components/autofill/core/browser/autofill_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: Created 6 years, 7 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/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index bfb8d492ca0e0cdfd936c8c9095c1ad72184f021..bc5356b97df92b75f98fa8e8ecb7247c97c0f3ac 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -557,6 +557,10 @@ void AutofillManager::FillOrPreviewForm(
// Mark the cached field as autofilled, so that we can detect when a
// user edits an autofilled field (for metrics).
form_structure->field(i)->is_autofilled = true;
+ // Mark the "select-one" field as autofilled when a non-empty value is
+ // assigned to it.
Ilya Sherman 2014/06/02 23:51:00 Is there any harm to doing this for all the autofi
+ if (result.fields[i].form_control_type == "select-one")
+ result.fields[i].is_autofilled = true;
if (should_notify)
manager_delegate_->DidFillOrPreviewField(value, profile_full_name);

Powered by Google App Engine
This is Rietveld 408576698