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

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

Issue 1375883002: Support Android username-only credentials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 years, 2 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/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;

Powered by Google App Engine
This is Rietveld 408576698