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())); |