OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autofill/browser/autofill_manager.h" | 5 #include "components/autofill/browser/autofill_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 #include <map> | 10 #include <map> |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
403 } | 403 } |
404 | 404 |
405 return true; | 405 return true; |
406 } | 406 } |
407 | 407 |
408 void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms, | 408 void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms, |
409 const TimeTicks& timestamp, | 409 const TimeTicks& timestamp, |
410 autofill::FormsSeenState state) { | 410 autofill::FormsSeenState state) { |
411 bool is_post_document_load = state == autofill::DYNAMIC_FORMS_SEEN; | 411 bool is_post_document_load = state == autofill::DYNAMIC_FORMS_SEEN; |
412 bool has_more_forms = state == autofill::PARTIAL_FORMS_SEEN; | 412 bool has_more_forms = state == autofill::PARTIAL_FORMS_SEEN; |
413 // If new forms were added via AJAX or DHML, treat as new page. | 413 // If new forms were added via AJAX or DHML, treat as new page. |
Ilya Sherman
2013/06/11 01:11:20
nit: Please update this comment.
Dane Wallinga
2013/06/11 19:03:32
Done.
| |
414 if (is_post_document_load) | 414 if (is_post_document_load) { |
415 Reset(); | 415 if (autocheckout_manager_.ShouldIgnoreDynamicFormChanges()) |
416 return; | |
417 else | |
418 Reset(); | |
419 } | |
416 | 420 |
417 RenderViewHost* host = web_contents()->GetRenderViewHost(); | 421 RenderViewHost* host = web_contents()->GetRenderViewHost(); |
418 if (!host) | 422 if (!host) |
419 return; | 423 return; |
420 | 424 |
421 if (!GetAutocheckoutURLPrefix().empty()) { | 425 if (!GetAutocheckoutURLPrefix().empty()) { |
422 // If whitelisted URL, fetch all the forms. | 426 // If whitelisted URL, fetch all the forms. |
423 if (has_more_forms) | 427 if (has_more_forms) |
424 host->Send(new AutofillMsg_GetAllForms(host->GetRoutingID())); | 428 host->Send(new AutofillMsg_GetAllForms(host->GetRoutingID())); |
425 if (!is_post_document_load) { | 429 if (!is_post_document_load) { |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1316 | 1320 |
1317 void AutofillManager::UpdateInitialInteractionTimestamp( | 1321 void AutofillManager::UpdateInitialInteractionTimestamp( |
1318 const TimeTicks& interaction_timestamp) { | 1322 const TimeTicks& interaction_timestamp) { |
1319 if (initial_interaction_timestamp_.is_null() || | 1323 if (initial_interaction_timestamp_.is_null() || |
1320 interaction_timestamp < initial_interaction_timestamp_) { | 1324 interaction_timestamp < initial_interaction_timestamp_) { |
1321 initial_interaction_timestamp_ = interaction_timestamp; | 1325 initial_interaction_timestamp_ = interaction_timestamp; |
1322 } | 1326 } |
1323 } | 1327 } |
1324 | 1328 |
1325 } // namespace autofill | 1329 } // namespace autofill |
OLD | NEW |