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

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

Issue 13947035: Fail autocheckout if there is no forms in the page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comments Created 7 years, 8 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 | « chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/autofill_manager.cc
diff --git a/components/autofill/browser/autofill_manager.cc b/components/autofill/browser/autofill_manager.cc
index c9acb0d03ca3ad1a24628b8314025e8869c8d9d4..e792565da0f919ab8a8262d32e03d621561f11d1 100644
--- a/components/autofill/browser/autofill_manager.cc
+++ b/components/autofill/browser/autofill_manager.cc
@@ -466,6 +466,14 @@ void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms,
}
autocheckout_manager_.OnFormsSeen();
+ if (forms.empty()) {
+ // Call OnLoadedPageMetaData with no page metadata immediately if there is
+ // no form in the page. This give |autocheckout_manager| a chance to
+ // terminate Autocheckout and send Autocheckout status.
+ autocheckout_manager_.OnLoadedPageMetaData(
+ scoped_ptr<autofill::AutocheckoutPageMetaData>(NULL));
+ }
+
bool enabled = IsAutofillEnabled();
if (!has_logged_autofill_enabled_) {
metric_logger_->LogIsAutofillEnabledAtPageLoad(enabled);
« no previous file with comments | « chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698