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 370a8f02e4aeced484a49090925c117b1ca8e2c3..a69286272af7758ac2846601cadb43ed13f18077 100644 |
--- a/components/autofill/core/browser/autofill_manager.cc |
+++ b/components/autofill/core/browser/autofill_manager.cc |
@@ -569,6 +569,12 @@ void AutofillManager::FillOrPreviewForm( |
// user edits an autofilled field (for metrics). |
autofill_field->is_autofilled = true; |
+ // Mark the field as autofilled when a non-empty value is assigned to |
+ // it. This allows the renderer to distinguish autofilled fields from |
+ // fields with non-empty values, such as select-one fields. |
+ int index = iter - result.fields.begin(); |
+ result.fields[index].is_autofilled = true; |
Ilya Sherman
2014/06/27 05:59:08
Why do you need an index? Can you just write this
|
+ |
if (!is_credit_card && !value.empty()) |
client_->DidFillOrPreviewField(value, profile_full_name); |
} |