Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: components/password_manager/core/browser/password_manager.cc

Issue 718043007: PasswordManager should not check the landing page for login form repetition for non-HTML forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/autofill/core/common/save_password_progress_logger.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4ac56380d8cc3a3c275e7764b389308ca6812345..26baf904c3759f8732e9326d99486591d9a81481 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -472,26 +472,32 @@ void PasswordManager::OnPasswordFormsRendered(
// If we see the login form again, then the login failed.
if (did_stop_loading) {
- for (size_t i = 0; i < all_visible_forms_.size(); ++i) {
- // TODO(vabr): The similarity check is just action equality up to
- // HTTP<->HTTPS substitution for now. If it becomes more complex, it may
- // make sense to consider modifying and using
- // PasswordFormManager::DoesManage for it.
- if (all_visible_forms_[i].action.is_valid() &&
- URLsEqualUpToHttpHttpsSubstitution(
- provisional_save_manager_->pending_credentials().action,
- all_visible_forms_[i].action)) {
- if (logger) {
- logger->LogPasswordForm(Logger::STRING_PASSWORD_FORM_REAPPEARED,
- visible_forms[i]);
- logger->LogMessage(Logger::STRING_DECISION_DROP);
+ if (provisional_save_manager_->pending_credentials().scheme
+ == PasswordForm::SCHEME_HTML) {
+ for (size_t i = 0; i < all_visible_forms_.size(); ++i) {
+ // TODO(vabr): The similarity check is just action equality up to
+ // HTTP<->HTTPS substitution for now. If it becomes more complex, it may
+ // make sense to consider modifying and using
+ // PasswordFormManager::DoesManage for it.
+ if (all_visible_forms_[i].action.is_valid() &&
+ URLsEqualUpToHttpHttpsSubstitution(
+ provisional_save_manager_->pending_credentials().action,
+ all_visible_forms_[i].action)) {
+ if (logger) {
+ logger->LogPasswordForm(Logger::STRING_PASSWORD_FORM_REAPPEARED,
+ visible_forms[i]);
+ logger->LogMessage(Logger::STRING_DECISION_DROP);
+ }
+ provisional_save_manager_->SubmitFailed();
+ provisional_save_manager_.reset();
+ // Clear all_visible_forms_ once we found the match.
+ all_visible_forms_.clear();
+ return;
}
- provisional_save_manager_->SubmitFailed();
- provisional_save_manager_.reset();
- // Clear all_visible_forms_ once we found the match.
- all_visible_forms_.clear();
- return;
}
+ } else {
+ if (logger)
+ logger->LogMessage(Logger::STRING_PROVISIONALLY_SAVED_FORM_IS_NOT_HTML);
}
// Clear all_visible_forms_ after checking all the visible forms.
« no previous file with comments | « components/autofill/core/common/save_password_progress_logger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698