| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 339 |
| 340 ParseForms(forms); | 340 ParseForms(forms); |
| 341 } | 341 } |
| 342 | 342 |
| 343 void AutofillManager::OnTextFieldDidChange(const FormData& form, | 343 void AutofillManager::OnTextFieldDidChange(const FormData& form, |
| 344 const FormFieldData& field, | 344 const FormFieldData& field, |
| 345 const TimeTicks& timestamp) { | 345 const TimeTicks& timestamp) { |
| 346 if (!IsValidFormData(form) || !IsValidFormFieldData(field)) | 346 if (!IsValidFormData(form) || !IsValidFormFieldData(field)) |
| 347 return; | 347 return; |
| 348 | 348 |
| 349 if (test_delegate_) |
| 350 test_delegate_->OnTextFieldChanged(); |
| 351 |
| 349 FormStructure* form_structure = NULL; | 352 FormStructure* form_structure = NULL; |
| 350 AutofillField* autofill_field = NULL; | 353 AutofillField* autofill_field = NULL; |
| 351 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) | 354 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) |
| 352 return; | 355 return; |
| 353 | 356 |
| 354 if (!user_did_type_) { | 357 if (!user_did_type_) { |
| 355 user_did_type_ = true; | 358 user_did_type_ = true; |
| 356 AutofillMetrics::LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE); | 359 AutofillMetrics::LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE); |
| 357 } | 360 } |
| 358 | 361 |
| (...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 if (i > 0) | 1640 if (i > 0) |
| 1638 fputs("Next oldest form:\n", file); | 1641 fputs("Next oldest form:\n", file); |
| 1639 } | 1642 } |
| 1640 fputs("\n", file); | 1643 fputs("\n", file); |
| 1641 | 1644 |
| 1642 fclose(file); | 1645 fclose(file); |
| 1643 } | 1646 } |
| 1644 #endif // ENABLE_FORM_DEBUG_DUMP | 1647 #endif // ENABLE_FORM_DEBUG_DUMP |
| 1645 | 1648 |
| 1646 } // namespace autofill | 1649 } // namespace autofill |
| OLD | NEW |