Chromium Code Reviews| 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..f83c3a2587ebe9c2e0a93e4366b6a7f827edd27e 100644 |
| --- a/components/autofill/core/browser/password_autofill_manager.cc |
| +++ b/components/autofill/core/browser/password_autofill_manager.cc |
| @@ -5,6 +5,7 @@ |
| #include "base/logging.h" |
| #include "components/autofill/core/browser/autofill_driver.h" |
| #include "components/autofill/core/browser/password_autofill_manager.h" |
| +#include "components/autofill/core/common/autofill_messages.h" |
| #include "ui/events/keycodes/keyboard_codes.h" |
| namespace autofill { |
| @@ -41,10 +42,21 @@ void PasswordAutofillManager::AddPasswordFormMapping( |
| login_to_password_info_[username_element] = password; |
| } |
| -void PasswordAutofillManager::Reset() { |
| - login_to_password_info_.clear(); |
| +bool PasswordAutofillManager::RemovePasswordSuggestion( |
| + const FormFieldData& field, |
| + const PasswordForm& password_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); |
| + |
| + Send(new AutofillHostMsg_RemovePasswordSuggestion(routing_id(), |
| + *password_form)); |
| + return true; |
| } |
| +void PasswordAutofillManager::Reset() { login_to_password_info_.clear(); } |
|
vabr (Chromium)
2014/01/14 15:01:21
nit: This might be because of the automatic format
riadh.chtara
2014/01/17 08:25:08
Yes you're right, it's git cl format who have done
|
| + |
| //////////////////////////////////////////////////////////////////////////////// |
| // PasswordAutofillManager, private: |