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

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: Created 5 years, 3 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 f01cc04d5c10f7ab82daba50bc39e0d5a5e4eb9a..8e3fc4e0db56111e6eca67b00c0ff0cc98ddbe92 100644
--- a/components/password_manager/core/browser/affiliated_match_helper.cc
+++ b/components/password_manager/core/browser/affiliated_match_helper.cc
@@ -138,13 +138,21 @@ ScopedVector<autofill::PasswordForm>
AffiliatedMatchHelper::TransformAffiliatedAndroidCredentials(
const autofill::PasswordForm& observed_form,
ScopedVector<autofill::PasswordForm> android_credentials) {
- for (autofill::PasswordForm* form : android_credentials) {
- DCHECK_EQ(form->scheme, autofill::PasswordForm::SCHEME_HTML);
+ ScopedVector<autofill::PasswordForm> result;
+ for (auto& form : android_credentials) {
Mike West 2015/09/29 09:36:09 Nit: Why change this to `auto`? It seemed clearer
vabr (Chromium) 2015/10/09 07:53:09 Vasilii now needs a reference to that pointer to b
vasilii 2015/10/12 15:12:48 Acknowledged.
+ if (form->scheme == autofill::PasswordForm::SCHEME_USERNAME_ONLY) {
+ if (form->federation_url.is_empty())
Mike West 2015/09/29 09:36:09 I don't really understand this. Why do we have fed
engedy 2015/10/08 17:31:01 Note that I have recently landed a fix for https:/
vasilii 2015/10/12 15:12:48 We can ignore them but they still exist on the mac
+ continue;
+ else
+ form->skip_zero_click = true;
+ }
form->origin = observed_form.origin;
form->original_signon_realm = form->signon_realm;
form->signon_realm = observed_form.signon_realm;
+ result.push_back(form);
+ form = nullptr;
}
- return android_credentials.Pass();
+ return result.Pass();
}
void AffiliatedMatchHelper::SetTaskRunnerUsedForWaitingForTesting(

Powered by Google App Engine
This is Rietveld 408576698