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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 2318533002: [Password Generation] Use signatures for form matching (Closed)
Patch Set: Rebase Created 4 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/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index adca0fac3c806be5cdd0a2ecc0e8d185436068ed..5fbc050cb54e1a547ef0b59a142cc58599943ce0 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -906,7 +906,7 @@ void AutofillManager::OnLoadedServerPredictions(
std::vector<FormStructure*> queried_forms;
for (const std::string& signature : base::Reversed(form_signatures)) {
for (FormStructure* cur_form : base::Reversed(form_structures_)) {
- if (cur_form->FormSignature() == signature) {
+ if (cur_form->FormSignatureAsStr() == signature) {
queried_forms.push_back(cur_form);
break;
}
@@ -1272,7 +1272,7 @@ void AutofillManager::UploadFormData(const FormStructure& submitted_form,
// Check if the form is among the forms that were recently auto-filled.
bool was_autofilled = false;
- std::string form_signature = submitted_form.FormSignature();
+ std::string form_signature = submitted_form.FormSignatureAsStr();
for (const std::string& cur_sig : autofilled_form_signatures_) {
if (cur_sig == form_signature) {
was_autofilled = true;
@@ -1539,7 +1539,7 @@ void AutofillManager::FillOrPreviewDataModelForm(
}
}
- autofilled_form_signatures_.push_front(form_structure->FormSignature());
+ autofilled_form_signatures_.push_front(form_structure->FormSignatureAsStr());
// Only remember the last few forms that we've seen, both to avoid false
// positives and to avoid wasting memory.
if (autofilled_form_signatures_.size() > kMaxRecentFormSignaturesToRemember)

Powered by Google App Engine
This is Rietveld 408576698