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

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

Issue 614023002: [Password manager] Relplace the FormFieldData vector from autofill::FormData with named fields… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated nit from Vaclav's review. Created 6 years, 1 month 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_autofill_manager.cc
diff --git a/components/password_manager/core/browser/password_autofill_manager.cc b/components/password_manager/core/browser/password_autofill_manager.cc
index 1a45c185369fe414e9cefb2eeb8a86b5299d039f..810e09dce70cf105a5d806d2fbf07792b81734c0 100644
--- a/components/password_manager/core/browser/password_autofill_manager.cc
+++ b/components/password_manager/core/browser/password_autofill_manager.cc
@@ -29,9 +29,8 @@ void GetSuggestions(const autofill::PasswordFormFillData& fill_data,
std::vector<base::string16>* realms,
bool show_all) {
if (show_all ||
- StartsWith(
- fill_data.basic_data.fields[0].value, current_username, false)) {
- suggestions->push_back(fill_data.basic_data.fields[0].value);
+ StartsWith(fill_data.username_field.value, current_username, false)) {
+ suggestions->push_back(fill_data.username_field.value);
realms->push_back(base::UTF8ToUTF16(fill_data.preferred_realm));
}
@@ -201,8 +200,8 @@ bool PasswordAutofillManager::GetPasswordForUsername(
// fetch the actual password. See crbug.com/178358 for more context.
// Look for any suitable matches to current field text.
- if (fill_data.basic_data.fields[0].value == current_username) {
- *password = fill_data.basic_data.fields[1].value;
+ if (fill_data.username_field.value == current_username) {
+ *password = fill_data.password_field.value;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698