Chromium Code Reviews| 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()); |