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

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

Issue 1375883002: Support Android username-only credentials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: engedy@ 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/password_manager_util.cc
diff --git a/components/password_manager/core/browser/password_manager_util.cc b/components/password_manager/core/browser/password_manager_util.cc
index b2bffc852f1947b11cc2f6a6db1be38182ba8a8c..44123a03d1e77996a8b9cdd1608cfc4ca2ce6958 100644
--- a/components/password_manager/core/browser/password_manager_util.cc
+++ b/components/password_manager/core/browser/password_manager_util.cc
@@ -58,4 +58,20 @@ void FindDuplicates(
forms->swap(unique_forms);
}
+void TrimUsernameOnlyCredentials(
+ 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);
+}
+
} // namespace password_manager_util

Powered by Google App Engine
This is Rietveld 408576698