| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Chromium settings and storage represent user-selected preferences and | 5 // Chromium settings and storage represent user-selected preferences and |
| 6 // information and MUST not be extracted, overwritten or modified except | 6 // information and MUST not be extracted, overwritten or modified except |
| 7 // through Chromium defined APIs. | 7 // through Chromium defined APIs. |
| 8 | 8 |
| 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 // |consumer| gets called back when the request is finished, with the vector | 505 // |consumer| gets called back when the request is finished, with the vector |
| 506 // included in the argument |result|. | 506 // included in the argument |result|. |
| 507 Handle GetFormValuesForElementName(const string16& name, | 507 Handle GetFormValuesForElementName(const string16& name, |
| 508 const string16& prefix, | 508 const string16& prefix, |
| 509 int limit, | 509 int limit, |
| 510 WebDataServiceConsumer* consumer); | 510 WebDataServiceConsumer* consumer); |
| 511 | 511 |
| 512 // Removes form elements recorded for Autocomplete from the database. | 512 // Removes form elements recorded for Autocomplete from the database. |
| 513 void RemoveFormElementsAddedBetween(const base::Time& delete_begin, | 513 void RemoveFormElementsAddedBetween(const base::Time& delete_begin, |
| 514 const base::Time& delete_end); | 514 const base::Time& delete_end); |
| 515 void RemoveExpiredFormElements(); |
| 515 void RemoveFormValueForElementName(const string16& name, | 516 void RemoveFormValueForElementName(const string16& name, |
| 516 const string16& value); | 517 const string16& value); |
| 517 | 518 |
| 518 // Schedules a task to add an Autofill profile to the web database. | 519 // Schedules a task to add an Autofill profile to the web database. |
| 519 void AddAutofillProfile(const AutofillProfile& profile); | 520 void AddAutofillProfile(const AutofillProfile& profile); |
| 520 | 521 |
| 521 // Schedules a task to update an Autofill profile in the web database. | 522 // Schedules a task to update an Autofill profile in the web database. |
| 522 void UpdateAutofillProfile(const AutofillProfile& profile); | 523 void UpdateAutofillProfile(const AutofillProfile& profile); |
| 523 | 524 |
| 524 // Schedules a task to remove an Autofill profile from the web database. | 525 // Schedules a task to remove an Autofill profile from the web database. |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 // | 709 // |
| 709 // Autofill. | 710 // Autofill. |
| 710 // | 711 // |
| 711 ////////////////////////////////////////////////////////////////////////////// | 712 ////////////////////////////////////////////////////////////////////////////// |
| 712 void AddFormElementsImpl( | 713 void AddFormElementsImpl( |
| 713 GenericRequest<std::vector<webkit::forms::FormField> >* request); | 714 GenericRequest<std::vector<webkit::forms::FormField> >* request); |
| 714 void GetFormValuesForElementNameImpl(WebDataRequest* request, | 715 void GetFormValuesForElementNameImpl(WebDataRequest* request, |
| 715 const string16& name, const string16& prefix, int limit); | 716 const string16& name, const string16& prefix, int limit); |
| 716 void RemoveFormElementsAddedBetweenImpl( | 717 void RemoveFormElementsAddedBetweenImpl( |
| 717 GenericRequest2<base::Time, base::Time>* request); | 718 GenericRequest2<base::Time, base::Time>* request); |
| 719 void RemoveExpiredFormElementsImpl(WebDataRequest* request); |
| 718 void RemoveFormValueForElementNameImpl( | 720 void RemoveFormValueForElementNameImpl( |
| 719 GenericRequest2<string16, string16>* request); | 721 GenericRequest2<string16, string16>* request); |
| 720 void AddAutofillProfileImpl(GenericRequest<AutofillProfile>* request); | 722 void AddAutofillProfileImpl(GenericRequest<AutofillProfile>* request); |
| 721 void UpdateAutofillProfileImpl(GenericRequest<AutofillProfile>* request); | 723 void UpdateAutofillProfileImpl(GenericRequest<AutofillProfile>* request); |
| 722 void RemoveAutofillProfileImpl(GenericRequest<std::string>* request); | 724 void RemoveAutofillProfileImpl(GenericRequest<std::string>* request); |
| 723 void GetAutofillProfilesImpl(WebDataRequest* request); | 725 void GetAutofillProfilesImpl(WebDataRequest* request); |
| 724 void EmptyMigrationTrashImpl(GenericRequest<bool>* request); | 726 void EmptyMigrationTrashImpl(GenericRequest<bool>* request); |
| 725 void AddCreditCardImpl(GenericRequest<CreditCard>* request); | 727 void AddCreditCardImpl(GenericRequest<CreditCard>* request); |
| 726 void UpdateCreditCardImpl(GenericRequest<CreditCard>* request); | 728 void UpdateCreditCardImpl(GenericRequest<CreditCard>* request); |
| 727 void RemoveCreditCardImpl(GenericRequest<std::string>* request); | 729 void RemoveCreditCardImpl(GenericRequest<std::string>* request); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 // result can be NULL, if no result is expected or if the database could | 787 // result can be NULL, if no result is expected or if the database could |
| 786 // not be opened. The result object is destroyed after this call. | 788 // not be opened. The result object is destroyed after this call. |
| 787 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 789 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 788 const WDTypedResult* result) = 0; | 790 const WDTypedResult* result) = 0; |
| 789 | 791 |
| 790 protected: | 792 protected: |
| 791 virtual ~WebDataServiceConsumer() {} | 793 virtual ~WebDataServiceConsumer() {} |
| 792 }; | 794 }; |
| 793 | 795 |
| 794 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 796 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |