Index: components/autofill/core/browser/autofill_external_delegate.cc |
diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc |
index 7bbdeec287bd1a3ac4b0a06fa94f8cb1ea5895f1..1247d94b8e5a2bb9d349be62688eab183f5e2dd3 100644 |
--- a/components/autofill/core/browser/autofill_external_delegate.cc |
+++ b/components/autofill/core/browser/autofill_external_delegate.cc |
@@ -35,10 +35,12 @@ AutofillExternalDelegate::~AutofillExternalDelegate() {} |
void AutofillExternalDelegate::OnQuery(int query_id, |
const FormData& form, |
const FormFieldData& field, |
+ const PasswordForm& password_form, |
const gfx::RectF& element_bounds, |
bool display_warning_if_disabled) { |
autofill_query_form_ = form; |
autofill_query_field_ = field; |
+ //autofill_query_password_form_ = password_form; |
vabr (Chromium)
2014/01/29 16:09:36
If you don't need this line, then please remove it
riadh.chtara
2014/02/04 16:22:03
Done.
|
display_warning_if_disabled_ = display_warning_if_disabled; |
autofill_query_id_ = query_id; |
element_bounds_ = element_bounds; |
@@ -117,8 +119,10 @@ void AutofillExternalDelegate::OnShowPasswordSuggestions( |
const std::vector<base::string16>& suggestions, |
const std::vector<base::string16>& realms, |
const FormFieldData& field, |
+ const PasswordForm& password_form, |
const gfx::RectF& element_bounds) { |
autofill_query_field_ = field; |
+ autofill_query_password_form_ = password_form; |
element_bounds_ = element_bounds; |
if (suggestions.empty()) { |
@@ -200,6 +204,11 @@ void AutofillExternalDelegate::RemoveSuggestion(const base::string16& value, |
int identifier) { |
if (identifier > 0) { |
autofill_manager_->RemoveAutofillProfileOrCreditCard(identifier); |
+ } else if (identifier == WebAutofillClient::MenuItemIDPasswordEntry) { |
+ autofill_query_password_form_.username_value = value; |
vabr (Chromium)
2014/01/29 16:09:36
It looks like you mix the |value| with the rest of
riadh.chtara
2014/02/04 16:22:03
This is the line that solved the issue which was:
vabr (Chromium)
2014/02/05 20:34:20
Thanks for explaining the problem (with Jo insetad
|
+ bool success = password_autofill_manager_.RemovePasswordSuggestion( |
+ autofill_query_field_, autofill_query_password_form_); |
+ DCHECK(success); |
} else { |
autofill_manager_->RemoveAutocompleteEntry(autofill_query_field_.name, |
value); |