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

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

Issue 1371713002: [Autofill] Return early when no new forms are parsed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: initial 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/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 6c5948a41d01ec5936ac3119a9b09d7401e7d80a..df2adad38007dc6131edae6abc3a591f83bab740 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -1394,6 +1394,11 @@ std::vector<Suggestion> AutofillManager::GetCreditCardSuggestions(
}
void AutofillManager::ParseForms(const std::vector<FormData>& forms) {
+ if (forms.empty()) {
+ // The renderer doesn't have any forms to parse.
Evan Stade 2015/09/26 00:09:16 I don't think this comment adds much, the early re
Mathieu 2015/09/26 14:12:58 Done.
+ return;
+ }
+
std::vector<FormStructure*> non_queryable_forms;
for (const FormData& form : forms) {
scoped_ptr<FormStructure> form_structure(new FormStructure(form));

Powered by Google App Engine
This is Rietveld 408576698