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

Unified Diff: components/password_manager/content/browser/credential_manager_impl.cc

Issue 2598003002: Suppress save and update bubbles when storing a PSL matched credential (Closed)
Patch Set: Addressed comments. Created 4 years 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/content/browser/credential_manager_impl.cc
diff --git a/components/password_manager/content/browser/credential_manager_impl.cc b/components/password_manager/content/browser/credential_manager_impl.cc
index 80b11b9697d868fdf4278d31534d9dab5a78d737..3f7a88e76264e3736dcacb5ceb6317f14e276746 100644
--- a/components/password_manager/content/browser/credential_manager_impl.cc
+++ b/components/password_manager/content/browser/credential_manager_impl.cc
@@ -86,6 +86,14 @@ void CredentialManagerImpl::OnProvisionalSaveComplete() {
DCHECK(client_->IsSavingAndFillingEnabledForCurrentPage());
const autofill::PasswordForm& form = form_manager_->pending_credentials();
+ if (form_manager_->IsPendingCredentialsPublicSuffixMatch()) {
+ // Having a credential with a PSL match implies there is no credential with
+ // an exactly matching origin and username. In order to avoid showing a save
+ // bubble to the user Save() is called directly.
+ form_manager_->Save();
+ return;
+ }
+
if (!form.federation_origin.unique()) {
// If this is a federated credential, check it against the federated matches
// produced by the PasswordFormManager. If a match is found, update it and

Powered by Google App Engine
This is Rietveld 408576698