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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // |cached_form| should be a pointer to the existing version of the form, or | 248 // |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 | 249 // 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. | 250 // |updated_form|. Returns false if the cache could not be updated. |
251 bool UpdateCachedForm(const FormData& live_form, | 251 bool UpdateCachedForm(const FormData& live_form, |
252 const FormStructure* cached_form, | 252 const FormStructure* cached_form, |
253 FormStructure** updated_form) WARN_UNUSED_RESULT; | 253 FormStructure** updated_form) WARN_UNUSED_RESULT; |
254 | 254 |
255 // Returns a list of values from the stored profiles that match |type| and the | 255 // Returns a list of values from the stored profiles that match |type| and the |
256 // value of |field| and returns the labels of the matching profiles. |labels| | 256 // value of |field| and returns the labels of the matching profiles. |labels| |
257 // is filled with the Profile label. | 257 // is filled with the Profile label. |
258 void GetProfileSuggestions(FormStructure* form, | 258 void GetProfileSuggestions(const FormStructure& form, |
259 const FormFieldData& field, | 259 const FormFieldData& field, |
260 const AutofillType& type, | 260 const AutofillType& type, |
261 std::vector<base::string16>* values, | 261 std::vector<base::string16>* values, |
262 std::vector<base::string16>* labels, | 262 std::vector<base::string16>* labels, |
263 std::vector<base::string16>* icons, | 263 std::vector<base::string16>* icons, |
264 std::vector<int>* unique_ids) const; | 264 std::vector<int>* unique_ids) const; |
265 | 265 |
266 // Returns a list of values from the stored credit cards that match |type| and | 266 // Returns a list of values from the stored credit cards that match |type| and |
267 // the value of |field| and returns the labels of the matching credit cards. | 267 // the value of |field| and returns the labels of the matching credit cards. |
268 void GetCreditCardSuggestions(const FormFieldData& field, | 268 void GetCreditCardSuggestions(const FormFieldData& field, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 UserHappinessFormLoadAndSubmission); | 372 UserHappinessFormLoadAndSubmission); |
373 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 373 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
374 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 374 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
375 FormSubmittedAutocompleteEnabled); | 375 FormSubmittedAutocompleteEnabled); |
376 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 376 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
377 }; | 377 }; |
378 | 378 |
379 } // namespace autofill | 379 } // namespace autofill |
380 | 380 |
381 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 381 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |