| 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_WEBDATA_AUTOFILL_WEBDATA_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual void RemoveFormValueForElementName(const base::string16& name, | 54 virtual void RemoveFormValueForElementName(const base::string16& name, |
| 55 const base::string16& value) = 0; | 55 const base::string16& value) = 0; |
| 56 | 56 |
| 57 // Schedules a task to add an Autofill profile to the web database. | 57 // Schedules a task to add an Autofill profile to the web database. |
| 58 virtual void AddAutofillProfile(const AutofillProfile& profile) = 0; | 58 virtual void AddAutofillProfile(const AutofillProfile& profile) = 0; |
| 59 | 59 |
| 60 // Schedules a task to update an Autofill profile in the web database. | 60 // Schedules a task to update an Autofill profile in the web database. |
| 61 virtual void UpdateAutofillProfile(const AutofillProfile& profile) = 0; | 61 virtual void UpdateAutofillProfile(const AutofillProfile& profile) = 0; |
| 62 | 62 |
| 63 // Schedules a task to remove an Autofill profile from the web database. | 63 // Schedules a task to remove an Autofill profile from the web database. |
| 64 // |guid| is the identifer of the profile to remove. | 64 // |guid| is the identifier of the profile to remove. |
| 65 virtual void RemoveAutofillProfile(const std::string& guid) = 0; | 65 virtual void RemoveAutofillProfile(const std::string& guid) = 0; |
| 66 | 66 |
| 67 // Initiates the request for local/server Autofill profiles. The method | 67 // Initiates the request for local/server Autofill profiles. The method |
| 68 // OnWebDataServiceRequestDone of |consumer| gets called when the request is | 68 // OnWebDataServiceRequestDone of |consumer| gets called when the request is |
| 69 // finished, with the profiles included in the argument |result|. The | 69 // finished, with the profiles included in the argument |result|. The |
| 70 // consumer owns the profiles. | 70 // consumer owns the profiles. |
| 71 virtual WebDataServiceBase::Handle GetAutofillProfiles( | 71 virtual WebDataServiceBase::Handle GetAutofillProfiles( |
| 72 WebDataServiceConsumer* consumer) = 0; | 72 WebDataServiceConsumer* consumer) = 0; |
| 73 virtual WebDataServiceBase::Handle GetServerProfiles( | 73 virtual WebDataServiceBase::Handle GetServerProfiles( |
| 74 WebDataServiceConsumer* consumer) = 0; | 74 WebDataServiceConsumer* consumer) = 0; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 85 virtual void UpdateAutofillEntries( | 85 virtual void UpdateAutofillEntries( |
| 86 const std::vector<AutofillEntry>& autofill_entries) = 0; | 86 const std::vector<AutofillEntry>& autofill_entries) = 0; |
| 87 | 87 |
| 88 // Schedules a task to add credit card to the web database. | 88 // Schedules a task to add credit card to the web database. |
| 89 virtual void AddCreditCard(const CreditCard& credit_card) = 0; | 89 virtual void AddCreditCard(const CreditCard& credit_card) = 0; |
| 90 | 90 |
| 91 // Schedules a task to update credit card in the web database. | 91 // Schedules a task to update credit card in the web database. |
| 92 virtual void UpdateCreditCard(const CreditCard& credit_card) = 0; | 92 virtual void UpdateCreditCard(const CreditCard& credit_card) = 0; |
| 93 | 93 |
| 94 // Schedules a task to remove a credit card from the web database. | 94 // Schedules a task to remove a credit card from the web database. |
| 95 // |guid| is identifer of the credit card to remove. | 95 // |guid| is identifier of the credit card to remove. |
| 96 virtual void RemoveCreditCard(const std::string& guid) = 0; | 96 virtual void RemoveCreditCard(const std::string& guid) = 0; |
| 97 | 97 |
| 98 // Initiates the request for local/server credit cards. The method | 98 // Initiates the request for local/server credit cards. The method |
| 99 // OnWebDataServiceRequestDone of |consumer| gets called when the request is | 99 // OnWebDataServiceRequestDone of |consumer| gets called when the request is |
| 100 // finished, with the credit cards included in the argument |result|. The | 100 // finished, with the credit cards included in the argument |result|. The |
| 101 // consumer owns the credit cards. | 101 // consumer owns the credit cards. |
| 102 virtual WebDataServiceBase::Handle GetCreditCards( | 102 virtual WebDataServiceBase::Handle GetCreditCards( |
| 103 WebDataServiceConsumer* consumer) = 0; | 103 WebDataServiceConsumer* consumer) = 0; |
| 104 virtual WebDataServiceBase::Handle GetServerCreditCards( | 104 virtual WebDataServiceBase::Handle GetServerCreditCards( |
| 105 WebDataServiceConsumer* consumer) = 0; | 105 WebDataServiceConsumer* consumer) = 0; |
| 106 | 106 |
| 107 // Toggles the record for a server credit card between masked (only last 4 | 107 // Toggles the record for a server credit card between masked (only last 4 |
| 108 // digits) and full (all digits). | 108 // digits) and full (all digits). |
| 109 virtual void UnmaskServerCreditCard(const CreditCard& credit_card, | 109 virtual void UnmaskServerCreditCard(const CreditCard& credit_card, |
| 110 const base::string16& full_number) = 0; | 110 const base::string16& full_number) = 0; |
| 111 virtual void MaskServerCreditCard(const std::string& id) = 0; | 111 virtual void MaskServerCreditCard(const std::string& id) = 0; |
| 112 | 112 |
| 113 // Updates the use count and last use date for a server card (masked or not). | 113 // Updates the use count and last use date for a server card (masked or not). |
| 114 virtual void UpdateServerCardUsageStats(const CreditCard& credit_card) = 0; | 114 virtual void UpdateServerCardUsageStats(const CreditCard& credit_card) = 0; |
| 115 | 115 |
| 116 // Updates the use count and last use date for a server address. | 116 // Updates the use count and last use date for a server address. |
| 117 virtual void UpdateServerAddressUsageStats(const AutofillProfile& profile) | 117 virtual void UpdateServerAddressUsageStats(const AutofillProfile& profile) |
| 118 = 0; | 118 = 0; |
| 119 | 119 |
| 120 // Updates the billing address for a server card (masked or not). |
| 121 virtual void UpdateServerCardBillingAddress(const CreditCard& credit_card) |
| 122 = 0; |
| 123 |
| 120 // Removes Autofill records from the database. | 124 // Removes Autofill records from the database. |
| 121 virtual void RemoveAutofillDataModifiedBetween( | 125 virtual void RemoveAutofillDataModifiedBetween( |
| 122 const base::Time& delete_begin, const base::Time& delete_end) = 0; | 126 const base::Time& delete_begin, const base::Time& delete_end) = 0; |
| 123 | 127 |
| 124 // Removes origin URLs associated with Autofill profiles and credit cards from | 128 // Removes origin URLs associated with Autofill profiles and credit cards from |
| 125 // the database. | 129 // the database. |
| 126 virtual void RemoveOriginURLsModifiedBetween( | 130 virtual void RemoveOriginURLsModifiedBetween( |
| 127 const base::Time& delete_begin, const base::Time& delete_end) = 0; | 131 const base::Time& delete_begin, const base::Time& delete_end) = 0; |
| 128 }; | 132 }; |
| 129 | 133 |
| 130 } // namespace autofill | 134 } // namespace autofill |
| 131 | 135 |
| 132 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_H_ | 136 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_H_ |
| OLD | NEW |