Index: components/autofill/browser/autofill_manager.cc |
diff --git a/components/autofill/browser/autofill_manager.cc b/components/autofill/browser/autofill_manager.cc |
index d6a5e838d8ad557f8f656c2baaa1e49ebed6c23e..e2fd38a03aaa2bc1b811902a14a4132bea9578a4 100644 |
--- a/components/autofill/browser/autofill_manager.cc |
+++ b/components/autofill/browser/autofill_manager.cc |
@@ -385,9 +385,14 @@ void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms, |
autofill::FormsSeenState state) { |
bool is_post_document_load = state == autofill::DYNAMIC_FORMS_SEEN; |
bool has_more_forms = state == autofill::PARTIAL_FORMS_SEEN; |
- // If new forms were added via AJAX or DHML, treat as new page. |
- if (is_post_document_load) |
- Reset(); |
+ // If new forms were added dynamically, and the autocheckout manager |
+ // doesn't tell us to ignore ajax on this page, treat as a new page. |
+ if (is_post_document_load) { |
+ if (autocheckout_manager_.ShouldIgnoreAjax()) |
+ return; |
+ else |
Ilya Sherman
2013/06/19 23:25:13
nit: No else stmt after a return, plz.
Dane Wallinga
2013/06/20 19:46:41
Done.
|
+ Reset(); |
+ } |
RenderViewHost* host = driver_->GetWebContents()->GetRenderViewHost(); |
if (!host) |