| Index: components/password_manager/core/browser/password_manager.cc
|
| diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
|
| index 06e50ece1597ff0667f51ed7ee5d39980aaa15fc..6609112661494ff938016796e99cf0634682f99c 100644
|
| --- a/components/password_manager/core/browser/password_manager.cc
|
| +++ b/components/password_manager/core/browser/password_manager.cc
|
| @@ -232,7 +232,6 @@ void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
|
| // Below, "matching" is in DoesManage-sense and "not ready" in
|
| // !HasCompletedMatching sense. We keep track of such PasswordFormManager
|
| // instances for UMA.
|
| - bool has_found_matching_managers_which_were_not_ready = false;
|
| for (ScopedVector<PasswordFormManager>::iterator iter =
|
| pending_login_managers_.begin();
|
| iter != pending_login_managers_.end(); ++iter) {
|
| @@ -249,11 +248,6 @@ void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
|
| continue;
|
| }
|
|
|
| - if (!(*iter)->HasCompletedMatching()) {
|
| - has_found_matching_managers_which_were_not_ready = true;
|
| - continue;
|
| - }
|
| -
|
| if (result == PasswordFormManager::RESULT_COMPLETE_MATCH) {
|
| // If we find a manager that exactly matches the submitted form including
|
| // the action URL, exit the loop.
|
| @@ -295,25 +289,11 @@ void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
|
| // |manager|.
|
| manager.reset(*matched_manager_it);
|
| pending_login_managers_.weak_erase(matched_manager_it);
|
| - } else if (has_found_matching_managers_which_were_not_ready) {
|
| - // We found some managers, but none finished matching yet. The user has
|
| - // tried to submit credentials before we had time to even find matching
|
| - // results for the given form and autofill. If this is the case, we just
|
| - // give up.
|
| - RecordFailure(MATCHING_NOT_COMPLETE, form.origin, logger.get());
|
| - return;
|
| } else {
|
| RecordFailure(NO_MATCHING_FORM, form.origin, logger.get());
|
| return;
|
| }
|
|
|
| - // Also get out of here if the user told us to 'never remember' passwords for
|
| - // this form.
|
| - if (manager->IsBlacklisted()) {
|
| - RecordFailure(FORM_BLACKLISTED, form.origin, logger.get());
|
| - return;
|
| - }
|
| -
|
| // Bail if we're missing any of the necessary form components.
|
| if (!manager->HasValidPasswordForm()) {
|
| RecordFailure(INVALID_FORM, form.origin, logger.get());
|
| @@ -520,6 +500,26 @@ void PasswordManager::OnPasswordFormsRendered(
|
| return;
|
| }
|
|
|
| + if (!provisional_save_manager_->HasCompletedMatching()) {
|
| + // We have a provisional save manager, but it didn't finish matching yet.
|
| + // We just give up.
|
| + RecordFailure(MATCHING_NOT_COMPLETE,
|
| + provisional_save_manager_->observed_form().origin,
|
| + logger.get());
|
| + provisional_save_manager_.reset();
|
| + return;
|
| + }
|
| +
|
| + // Also get out of here if the user told us to 'never remember' passwords for
|
| + // this form.
|
| + if (provisional_save_manager_->IsBlacklisted()) {
|
| + RecordFailure(FORM_BLACKLISTED,
|
| + provisional_save_manager_->observed_form().origin,
|
| + logger.get());
|
| + provisional_save_manager_.reset();
|
| + return;
|
| + }
|
| +
|
| DCHECK(IsSavingEnabledForCurrentPage());
|
|
|
| // If the server throws an internal error, access denied page, page not
|
|
|