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

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

Issue 1723583003: CREDENTIAL: Filter affiliated credentials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/credential_manager_pending_request_task.cc
diff --git a/components/password_manager/core/browser/credential_manager_pending_request_task.cc b/components/password_manager/core/browser/credential_manager_pending_request_task.cc
index 6414ec3cdab9c22851f3642f8b0f4e1d6be703ba..d157b59760df3fbae70e2aaed079b9436fb1a7c5 100644
--- a/components/password_manager/core/browser/credential_manager_pending_request_task.cc
+++ b/components/password_manager/core/browser/credential_manager_pending_request_task.cc
@@ -62,9 +62,13 @@ void CredentialManagerPendingRequestTask::OnGetPasswordStoreResults(
}
} else if (affiliated_realms_.count(form->signon_realm) &&
AffiliatedMatchHelper::IsValidAndroidCredential(*form)) {
- form->is_affiliation_based_match = true;
- affiliated_results.push_back(form);
- form = nullptr;
+ if ((form->federation_url.is_empty() && include_passwords_) ||
vabr (Chromium) 2016/02/23 09:24:54 optional nit: Would it make sense to pull-out the
+ (!form->federation_url.is_empty() &&
+ federations_.count(form->federation_url.spec()))) {
+ form->is_affiliation_based_match = true;
+ affiliated_results.push_back(form);
+ form = nullptr;
+ }
}
// TODO(mkwst): We're debating whether or not federations ought to be
@@ -76,9 +80,6 @@ void CredentialManagerPendingRequestTask::OnGetPasswordStoreResults(
}
if (!affiliated_results.empty()) {
- // TODO(mkwst): This doesn't create a PasswordForm that we can use to create
- // a FederatedCredential (via CreatePasswordFormFromCredentialInfo). We need
- // to fix that.
password_manager_util::TrimUsernameOnlyCredentials(&affiliated_results);
local_results.insert(local_results.end(), affiliated_results.begin(),
affiliated_results.end());

Powered by Google App Engine
This is Rietveld 408576698