| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/core/browser/autofill_manager.h" | 5 #include "components/autofill/core/browser/autofill_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 340 |
| 341 ParseForms(forms); | 341 ParseForms(forms); |
| 342 } | 342 } |
| 343 | 343 |
| 344 void AutofillManager::OnTextFieldDidChange(const FormData& form, | 344 void AutofillManager::OnTextFieldDidChange(const FormData& form, |
| 345 const FormFieldData& field, | 345 const FormFieldData& field, |
| 346 const TimeTicks& timestamp) { | 346 const TimeTicks& timestamp) { |
| 347 if (!IsValidFormData(form) || !IsValidFormFieldData(field)) | 347 if (!IsValidFormData(form) || !IsValidFormFieldData(field)) |
| 348 return; | 348 return; |
| 349 | 349 |
| 350 if (test_delegate_) |
| 351 test_delegate_->OnTextFieldChanged(); |
| 352 |
| 350 FormStructure* form_structure = NULL; | 353 FormStructure* form_structure = NULL; |
| 351 AutofillField* autofill_field = NULL; | 354 AutofillField* autofill_field = NULL; |
| 352 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) | 355 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) |
| 353 return; | 356 return; |
| 354 | 357 |
| 355 if (!user_did_type_) { | 358 if (!user_did_type_) { |
| 356 user_did_type_ = true; | 359 user_did_type_ = true; |
| 357 AutofillMetrics::LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE); | 360 AutofillMetrics::LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE); |
| 358 } | 361 } |
| 359 | 362 |
| (...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 if (i > 0) | 1634 if (i > 0) |
| 1632 fputs("Next oldest form:\n", file); | 1635 fputs("Next oldest form:\n", file); |
| 1633 } | 1636 } |
| 1634 fputs("\n", file); | 1637 fputs("\n", file); |
| 1635 | 1638 |
| 1636 fclose(file); | 1639 fclose(file); |
| 1637 } | 1640 } |
| 1638 #endif // ENABLE_FORM_DEBUG_DUMP | 1641 #endif // ENABLE_FORM_DEBUG_DUMP |
| 1639 | 1642 |
| 1640 } // namespace autofill | 1643 } // namespace autofill |
| OLD | NEW |