| 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 size_t* variant, | 230 size_t* variant, |
| 231 bool* is_credit_card) const WARN_UNUSED_RESULT; | 231 bool* is_credit_card) const WARN_UNUSED_RESULT; |
| 232 | 232 |
| 233 // Fills |form_structure| cached element corresponding to |form|. | 233 // Fills |form_structure| cached element corresponding to |form|. |
| 234 // Returns false if the cached element was not found. | 234 // Returns false if the cached element was not found. |
| 235 bool FindCachedForm(const FormData& form, | 235 bool FindCachedForm(const FormData& form, |
| 236 FormStructure** form_structure) const WARN_UNUSED_RESULT; | 236 FormStructure** form_structure) const WARN_UNUSED_RESULT; |
| 237 | 237 |
| 238 // Fills |form_structure| and |autofill_field| with the cached elements | 238 // Fills |form_structure| and |autofill_field| with the cached elements |
| 239 // corresponding to |form| and |field|. This might have the side-effect of | 239 // corresponding to |form| and |field|. This might have the side-effect of |
| 240 // updating the cache. Returns false if the |form| is not autofillable, or if | 240 // updating the cache. Returns false if the |form| has no autofillable |
| 241 // it is not already present in the cache and the cache is full. | 241 // fields, or if it is not already present in the cache and the cache is |
| 242 // full. |
| 242 bool GetCachedFormAndField(const FormData& form, | 243 bool GetCachedFormAndField(const FormData& form, |
| 243 const FormFieldData& field, | 244 const FormFieldData& field, |
| 244 FormStructure** form_structure, | 245 FormStructure** form_structure, |
| 245 AutofillField** autofill_field) WARN_UNUSED_RESULT; | 246 AutofillField** autofill_field) WARN_UNUSED_RESULT; |
| 246 | 247 |
| 247 // Re-parses |live_form| and adds the result to |form_structures_|. | 248 // Re-parses |live_form| and adds the result to |form_structures_|. |
| 248 // |cached_form| should be a pointer to the existing version of the form, or | 249 // |cached_form| should be a pointer to the existing version of the form, or |
| 249 // NULL if no cached version exists. The updated form is then written into | 250 // NULL if no cached version exists. The updated form is then written into |
| 250 // |updated_form|. Returns false if the cache could not be updated. | 251 // |updated_form|. Returns false if the cache could not be updated. |
| 251 bool UpdateCachedForm(const FormData& live_form, | 252 bool UpdateCachedForm(const FormData& live_form, |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 UserHappinessFormLoadAndSubmission); | 373 UserHappinessFormLoadAndSubmission); |
| 373 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 374 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
| 374 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 375 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 375 FormSubmittedAutocompleteEnabled); | 376 FormSubmittedAutocompleteEnabled); |
| 376 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 377 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 377 }; | 378 }; |
| 378 | 379 |
| 379 } // namespace autofill | 380 } // namespace autofill |
| 380 | 381 |
| 381 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 382 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| OLD | NEW |