Chromium Code Reviews| Index: components/password_manager/core/browser/affiliated_match_helper.cc |
| diff --git a/components/password_manager/core/browser/affiliated_match_helper.cc b/components/password_manager/core/browser/affiliated_match_helper.cc |
| index 4c18384055b07924a8c837853238d0f71f82ca75..eb7096803792a568cfe1f2705acd8bbcfdca12b1 100644 |
| --- a/components/password_manager/core/browser/affiliated_match_helper.cc |
| +++ b/components/password_manager/core/browser/affiliated_match_helper.cc |
| @@ -133,6 +133,23 @@ bool AffiliatedMatchHelper::IsValidWebCredential( |
| facet_uri.IsValidWebFacetURI(); |
| } |
| +// static |
| +void AffiliatedMatchHelper::TrimAndroidUsernameOnlyCredentials( |
|
engedy
2015/10/13 12:11:33
nit: Given that the SCHEME is no longer specific t
vasilii
2015/10/13 18:05:26
Done.
|
| + ScopedVector<autofill::PasswordForm>* android_credentials) { |
| + ScopedVector<autofill::PasswordForm> result; |
| + for (auto& form : *android_credentials) { |
| + if (form->scheme == autofill::PasswordForm::SCHEME_USERNAME_ONLY) { |
| + if (form->federation_url.is_empty()) |
| + continue; |
| + else |
| + form->skip_zero_click = true; |
| + } |
| + result.push_back(form); |
| + form = nullptr; |
| + } |
| + android_credentials->swap(result); |
| +} |
| + |
| void AffiliatedMatchHelper::SetTaskRunnerUsedForWaitingForTesting( |
| const scoped_refptr<base::SingleThreadTaskRunner> task_runner) { |
| task_runner_for_waiting_ = task_runner; |