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

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: add comments for why we do not do null check for TabAutofillManagerDelegate::dialog_controller_ 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..226c1c3a40f932763c0a5f6b1c67559c45fec42b 100644
--- a/components/autofill/browser/autofill_manager.cc
+++ b/components/autofill/browser/autofill_manager.cc
@@ -1260,8 +1260,14 @@ void AutofillManager::ParseForms(const std::vector<FormData>& forms) {
non_queryable_forms.push_back(form_structure.release());
}
- // If none of the forms were parsed, no use querying the server.
- if (!form_structures_.empty() && !disable_download_manager_requests_) {
+ if (form_structures_.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));
+ } else if (!disable_download_manager_requests_) {
+ // Query the server if we have at least one of the forms were parsed.
download_manager_.StartQueryRequest(form_structures_.get(),
*metric_logger_);
}
« 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