Index: chrome/browser/password_manager/password_form_manager.cc |
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc |
index 59c5a6a2e16fcf646892747a4edb4440b8930f07..e86d5682368cfa352164ec3e33035008a7e4a3bf 100644 |
--- a/chrome/browser/password_manager/password_form_manager.cc |
+++ b/chrome/browser/password_manager/password_form_manager.cc |
@@ -106,6 +106,30 @@ bool PasswordFormManager::DoesManage(const PasswordForm& form, |
return true; |
} |
+void PasswordFormManager::SavePassword() { |
+ PasswordStore* password_store = PasswordStoreFactory::GetForProfile( |
+ profile_, Profile::EXPLICIT_ACCESS).get(); |
+ if (!password_store) { |
+ NOTREACHED(); |
+ return; |
+ } |
Garrett Casto
2013/08/28 00:08:33
Note, there should be no reason to do this, the pa
npentrel
2013/08/28 08:48:44
Done.
|
+ DCHECK_EQ(state_, POST_MATCHING_PHASE); |
+ |
+ // Configure the form about to be saved for non-blacklisted status. |
+ // This is done as the user can choose to blacklist the password and then |
+ // undo the previously selected and save the password. |
+ pending_credentials_.preferred = true; |
+ pending_credentials_.blacklisted_by_user = false; |
+ |
+ // Save the pending_credentials_ entry marked as not-blacklisted. |
+ DCHECK(!profile_->IsOffTheRecord()); |
+ if (IsNewLogin()) { |
+ SaveAsNewLogin(true); |
+ } else { |
+ UpdateLogin(); |
+ } |
+} |
+ |
bool PasswordFormManager::IsBlacklisted() { |
DCHECK_EQ(state_, POST_MATCHING_PHASE); |
if (preferred_match_ && preferred_match_->blacklisted_by_user) |
@@ -119,8 +143,6 @@ void PasswordFormManager::PermanentlyBlacklist() { |
// Configure the form about to be saved for blacklist status. |
pending_credentials_.preferred = true; |
pending_credentials_.blacklisted_by_user = true; |
- pending_credentials_.username_value.clear(); |
- pending_credentials_.password_value.clear(); |
// Retroactively forget existing matches for this form, so we NEVER prompt or |
// autofill it again. |