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..2d1e6617d6f755151629c75cde023814d3349824 100644 |
--- a/components/autofill/core/browser/autofill_external_delegate.cc |
+++ b/components/autofill/core/browser/autofill_external_delegate.cc |
@@ -117,8 +117,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 +202,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; |
+ bool success = password_autofill_manager_.RemovePasswordSuggestion( |
+ autofill_query_field_, autofill_query_password_form_); |
+ DCHECK(success); |
} else { |
autofill_manager_->RemoveAutocompleteEntry(autofill_query_field_.name, |
value); |