| Index: components/autofill/core/browser/password_autofill_manager.cc
|
| diff --git a/components/autofill/core/browser/password_autofill_manager.cc b/components/autofill/core/browser/password_autofill_manager.cc
|
| index 730c10e49d5d1b2282440dcf3dd406593cd3977b..c39d3ef8649f79ac1899d03441c83db2e0e18702 100644
|
| --- a/components/autofill/core/browser/password_autofill_manager.cc
|
| +++ b/components/autofill/core/browser/password_autofill_manager.cc
|
| @@ -3,8 +3,11 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/logging.h"
|
| +#include "components/autofill/content/renderer/password_form_conversion_utils.h"
|
| +#include "components/autofill/core/common/autofill_messages.h"
|
| #include "components/autofill/core/browser/autofill_driver.h"
|
| #include "components/autofill/core/browser/password_autofill_manager.h"
|
| +#include "third_party/WebKit/public/web/WebFormElement.h"
|
| #include "ui/events/keycodes/keyboard_codes.h"
|
|
|
| namespace autofill {
|
| @@ -41,6 +44,21 @@ void PasswordAutofillManager::AddPasswordFormMapping(
|
| login_to_password_info_[username_element] = password;
|
| }
|
|
|
| +bool PasswordAutofillManager::RemovePasswordSuggestion(
|
| + const FormFieldData& field,
|
| + const blink::WebFormElement& form) {
|
| + LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(field);
|
| + if (iter == login_to_password_info_.end())
|
| + return false;
|
| + login_to_password_info_.erase(iter);
|
| +
|
| + scoped_ptr<PasswordForm> password_form = CreatePasswordForm(form);
|
| + Send(new AutofillHostMsg_RemovePasswordSuggestion(
|
| + routing_id(),
|
| + form));
|
| + return true;
|
| +}
|
| +
|
| void PasswordAutofillManager::Reset() {
|
| login_to_password_info_.clear();
|
| }
|
|
|