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

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

Issue 1161023008: Suggest to fill password change forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months 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
Index: components/password_manager/core/browser/password_form_manager.cc
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index da366f28f3608468d3b1c6b81e811def05582451..dec8e5add7178e2704b308c2d1d5995025dd5696 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -470,32 +470,21 @@ void PasswordFormManager::ProcessFrame(
if (best_matches_.empty())
return;
- // Do not autofill on sign-up or change password forms (until we have some
- // working change password functionality). Combined login-sign-up forms are OK
- // to autofill in the login part.
- if (observed_form_.layout != PasswordForm::Layout::LAYOUT_LOGIN_AND_SIGNUP &&
- !observed_form_.new_password_element.empty()) {
- if (client_->IsLoggingActive()) {
- BrowserSavePasswordProgressLogger logger(client_);
- logger.LogMessage(Logger::STRING_PROCESS_FRAME_METHOD);
- logger.LogMessage(Logger::STRING_FORM_NOT_AUTOFILLED);
- }
- return;
- }
-
// Proceed to autofill.
// Note that we provide the choices but don't actually prefill a value if:
// (1) we are in Incognito mode, (2) the ACTION paths don't match,
// or (3) if it matched using public suffix domain matching.
- // However, 2 and 3 should not apply to Android-based credentials found via
- // affiliation-based matching (we want to autofill them).
+ // (4) the form has new password field, i.e. it's Sign Up or password change
+ // form. However, 2 and 3 should not apply to Android-based credentials found
+ // via affiliation-based matching (we want to autofill them).
// TODO(engedy): Clean this up. See: https://crbug.com/476519.
bool wait_for_username =
client_->IsOffTheRecord() ||
(!IsValidAndroidFacetURI(preferred_match_->original_signon_realm) &&
(observed_form_.action.GetWithEmptyPath() !=
preferred_match_->action.GetWithEmptyPath() ||
- preferred_match_->IsPublicSuffixMatch()));
+ preferred_match_->IsPublicSuffixMatch() ||
+ !observed_form_.new_password_element.empty()));
if (wait_for_username)
manager_action_ = kManagerActionNone;
else

Powered by Google App Engine
This is Rietveld 408576698