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

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

Issue 13264002: Requery the autofill server when forms and input fields are dynamically added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and again, except this time remembering to hit save first. Created 7 years, 9 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/browser/autofill_manager.cc
diff --git a/components/autofill/browser/autofill_manager.cc b/components/autofill/browser/autofill_manager.cc
index d2632fc6308f63cad5a94a4cbd83fe8e0a32e355..14b480b2a03a076b60ad8573017886295465c926 100644
--- a/components/autofill/browser/autofill_manager.cc
+++ b/components/autofill/browser/autofill_manager.cc
@@ -448,14 +448,20 @@ bool AutofillManager::OnFormSubmitted(const FormData& form,
void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms,
const TimeTicks& timestamp,
- bool has_more_forms) {
+ bool has_more_forms,
+ bool is_post_document_load) {
+ // if new forms were added via AJAX or DHML, treat as new page.
ahutter 2013/03/29 21:53:08 nit: If
Dane Wallinga 2013/04/02 19:50:54 Done.
+ if (is_post_document_load)
+ Reset();
ahutter 2013/03/29 21:53:08 Maybe a newline after this.
Dane Wallinga 2013/04/02 19:50:54 Done.
RenderViewHost* host = web_contents()->GetRenderViewHost();
if (!host)
return;
if (!GetAutocheckoutURLPrefix().empty()) {
- host->Send(
- new AutofillMsg_WhitelistedForAutocheckout(host->GetRoutingID()));
+ if (!is_post_document_load) {
+ host->Send(
+ new AutofillMsg_WhitelistedForAutocheckout(host->GetRoutingID()));
+ }
// If whitelisted URL, fetch all the forms.
if (has_more_forms) {
host->Send(new AutofillMsg_GetAllForms(host->GetRoutingID()));
« no previous file with comments | « components/autofill/browser/autofill_manager.h ('k') | components/autofill/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698