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

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: addressed comments 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
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e667d61e77b0877e439fd3c2c534e10e8d2e369a 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -1394,6 +1394,9 @@ std::vector<Suggestion> AutofillManager::GetCreditCardSuggestions(
}
void AutofillManager::ParseForms(const std::vector<FormData>& forms) {
+ if (forms.empty())
+ return;
+
std::vector<FormStructure*> non_queryable_forms;
for (const FormData& form : forms) {
scoped_ptr<FormStructure> form_structure(new FormStructure(form));
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698