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 <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 | 53 |
54 namespace autofill { | 54 namespace autofill { |
55 | 55 |
56 class AutofillDataModel; | 56 class AutofillDataModel; |
57 class AutofillDownloadManager; | 57 class AutofillDownloadManager; |
58 class AutofillExternalDelegate; | 58 class AutofillExternalDelegate; |
59 class AutofillField; | 59 class AutofillField; |
60 class AutofillClient; | 60 class AutofillClient; |
61 class AutofillManagerTestDelegate; | 61 class AutofillManagerTestDelegate; |
62 class AutofillProfile; | 62 class AutofillProfile; |
63 class AutofillType; | |
64 class CreditCard; | 63 class CreditCard; |
65 class FormStructureBrowserTest; | 64 class FormStructureBrowserTest; |
66 | 65 |
67 struct FormData; | 66 struct FormData; |
68 struct FormFieldData; | 67 struct FormFieldData; |
69 | 68 |
70 // We show the credit card signin promo only a certain number of times. | 69 // We show the credit card signin promo only a certain number of times. |
71 extern const int kCreditCardSigninPromoImpressionLimit; | 70 extern const int kCreditCardSigninPromoImpressionLimit; |
72 | 71 |
73 // Manages saving and restoring the user's personal information entered into web | 72 // Manages saving and restoring the user's personal information entered into web |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
396 WARN_UNUSED_RESULT; | 395 WARN_UNUSED_RESULT; |
397 | 396 |
398 // Re-parses |live_form| and adds the result to |form_structures_|. | 397 // Re-parses |live_form| and adds the result to |form_structures_|. |
399 // |cached_form| should be a pointer to the existing version of the form, or | 398 // |cached_form| should be a pointer to the existing version of the form, or |
400 // NULL if no cached version exists. The updated form is then written into | 399 // NULL if no cached version exists. The updated form is then written into |
401 // |updated_form|. Returns false if the cache could not be updated. | 400 // |updated_form|. Returns false if the cache could not be updated. |
402 bool UpdateCachedForm(const FormData& live_form, | 401 bool UpdateCachedForm(const FormData& live_form, |
403 const FormStructure* cached_form, | 402 const FormStructure* cached_form, |
404 FormStructure** updated_form) WARN_UNUSED_RESULT; | 403 FormStructure** updated_form) WARN_UNUSED_RESULT; |
405 | 404 |
406 // Returns a list of values from the stored profiles that match |type| and the | 405 // Returns a list of values from the stored profiles that match field type |
407 // value of |field| and returns the labels of the matching profiles. |labels| | 406 // |autofill_field.Type()| and the value of |field| and returns the labels of |
csashi
2017/04/27 18:41:17
Reorder as
"that match the value of |field| and ma
jiahuiguo
2017/05/24 18:00:00
Moved the ukm from pollsuggestions to suggestionsS
| |
408 // is filled with the Profile label. | 407 // the matching profiles. |labels| is filled with the Profile label. |
409 std::vector<Suggestion> GetProfileSuggestions( | 408 std::vector<Suggestion> GetProfileSuggestions( |
410 const FormStructure& form, | 409 const FormStructure& form, |
411 const FormFieldData& field, | 410 const FormFieldData& field, |
412 const AutofillField& autofill_field) const; | 411 const AutofillField& autofill_field) const; |
413 | 412 |
414 // Returns a list of values from the stored credit cards that match |type| and | 413 // Returns a list of values from the stored credit cards that match field type |
415 // the value of |field| and returns the labels of the matching credit cards. | 414 // |autofill_field.Type()| and the value of |field| and returns the labels of |
415 // the matching credit cards. | |
csashi
2017/04/27 18:41:17
Same comment.
jiahuiguo
2017/05/24 18:00:00
Acknowledged.
| |
416 std::vector<Suggestion> GetCreditCardSuggestions( | 416 std::vector<Suggestion> GetCreditCardSuggestions( |
417 const FormFieldData& field, | 417 const FormFieldData& field, |
418 const AutofillType& type) const; | 418 const AutofillField& autofill_field) const; |
419 | 419 |
420 // Parses the forms using heuristic matching and querying the Autofill server. | 420 // Parses the forms using heuristic matching and querying the Autofill server. |
421 void ParseForms(const std::vector<FormData>& forms); | 421 void ParseForms(const std::vector<FormData>& forms); |
422 | 422 |
423 // Parses the form and adds it to |form_structures_|. | 423 // Parses the form and adds it to |form_structures_|. |
424 bool ParseForm(const FormData& form, FormStructure** parsed_form_structure); | 424 bool ParseForm(const FormData& form, FormStructure** parsed_form_structure); |
425 | 425 |
426 // Imports the form data, submitted by the user, into |personal_data_|. | 426 // Imports the form data, submitted by the user, into |personal_data_|. |
427 void ImportFormData(const FormStructure& submitted_form); | 427 void ImportFormData(const FormStructure& submitted_form); |
428 | 428 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
635 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 635 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
636 OnLoadedServerPredictions_ResetManager); | 636 OnLoadedServerPredictions_ResetManager); |
637 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); | 637 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); |
638 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); | 638 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); |
639 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 639 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
640 }; | 640 }; |
641 | 641 |
642 } // namespace autofill | 642 } // namespace autofill |
643 | 643 |
644 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 644 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |