Chromium Code Reviews| 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..c8a0c783fca075f0eeb7fb1f168ee545d3c3e189 100644 |
| --- a/components/autofill/browser/autofill_manager.cc |
| +++ b/components/autofill/browser/autofill_manager.cc |
| @@ -448,14 +448,19 @@ 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 are the result of AJAX or DHML, treat as new page. |
|
ahutter
2013/03/29 19:48:31
"If new forms were added via AJAX or DHTML..."
Dane Wallinga
2013/03/29 21:41:12
Done.
|
| + if (is_post_document_load) |
| + Reset(); |
| RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| if (!host) |
| return; |
| if (!GetAutocheckoutURLPrefix().empty()) { |
| - host->Send( |
| - new AutofillMsg_WhitelistedForAutocheckout(host->GetRoutingID())); |
| + if (!is_post_document_load) |
|
ahutter
2013/03/29 19:48:31
curlies since this is multiline
Dane Wallinga
2013/03/29 21:41:12
Even if it's just one statement with wrapping? Chr
|
| + 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())); |