OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 // Schedules a task to remove an AutoFill profile from the web database. | 447 // Schedules a task to remove an AutoFill profile from the web database. |
448 // |guid| is the identifer of the profile to remove. | 448 // |guid| is the identifer of the profile to remove. |
449 void RemoveAutofillProfile(const std::string& guid); | 449 void RemoveAutofillProfile(const std::string& guid); |
450 | 450 |
451 // Initiates the request for all AutoFill profiles. The method | 451 // Initiates the request for all AutoFill profiles. The method |
452 // OnWebDataServiceRequestDone of |consumer| gets called when the request is | 452 // OnWebDataServiceRequestDone of |consumer| gets called when the request is |
453 // finished, with the profiles included in the argument |result|. The | 453 // finished, with the profiles included in the argument |result|. The |
454 // consumer owns the profiles. | 454 // consumer owns the profiles. |
455 Handle GetAutofillProfiles(WebDataServiceConsumer* consumer); | 455 Handle GetAutofillProfiles(WebDataServiceConsumer* consumer); |
456 | 456 |
| 457 // Remove "trashed" profile guids from the web database and optionally send |
| 458 // notifications to tell Sync that the items have been removed. |
| 459 void EmptyMigrationTrash(bool notify_sync); |
| 460 |
457 // Schedules a task to add credit card to the web database. | 461 // Schedules a task to add credit card to the web database. |
458 void AddCreditCard(const CreditCard& credit_card); | 462 void AddCreditCard(const CreditCard& credit_card); |
459 | 463 |
460 // Schedules a task to update credit card in the web database. | 464 // Schedules a task to update credit card in the web database. |
461 void UpdateCreditCard(const CreditCard& credit_card); | 465 void UpdateCreditCard(const CreditCard& credit_card); |
462 | 466 |
463 // Schedules a task to remove a credit card from the web database. | 467 // Schedules a task to remove a credit card from the web database. |
464 // |guid| is identifer of the credit card to remove. | 468 // |guid| is identifer of the credit card to remove. |
465 void RemoveCreditCard(const std::string& guid); | 469 void RemoveCreditCard(const std::string& guid); |
466 | 470 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 void GetFormValuesForElementNameImpl(WebDataRequest* request, | 600 void GetFormValuesForElementNameImpl(WebDataRequest* request, |
597 const string16& name, const string16& prefix, int limit); | 601 const string16& name, const string16& prefix, int limit); |
598 void RemoveFormElementsAddedBetweenImpl( | 602 void RemoveFormElementsAddedBetweenImpl( |
599 GenericRequest2<base::Time, base::Time>* request); | 603 GenericRequest2<base::Time, base::Time>* request); |
600 void RemoveFormValueForElementNameImpl( | 604 void RemoveFormValueForElementNameImpl( |
601 GenericRequest2<string16, string16>* request); | 605 GenericRequest2<string16, string16>* request); |
602 void AddAutofillProfileImpl(GenericRequest<AutofillProfile>* request); | 606 void AddAutofillProfileImpl(GenericRequest<AutofillProfile>* request); |
603 void UpdateAutofillProfileImpl(GenericRequest<AutofillProfile>* request); | 607 void UpdateAutofillProfileImpl(GenericRequest<AutofillProfile>* request); |
604 void RemoveAutofillProfileImpl(GenericRequest<std::string>* request); | 608 void RemoveAutofillProfileImpl(GenericRequest<std::string>* request); |
605 void GetAutofillProfilesImpl(WebDataRequest* request); | 609 void GetAutofillProfilesImpl(WebDataRequest* request); |
| 610 void EmptyMigrationTrashImpl(GenericRequest<bool>* request); |
606 void AddCreditCardImpl(GenericRequest<CreditCard>* request); | 611 void AddCreditCardImpl(GenericRequest<CreditCard>* request); |
607 void UpdateCreditCardImpl(GenericRequest<CreditCard>* request); | 612 void UpdateCreditCardImpl(GenericRequest<CreditCard>* request); |
608 void RemoveCreditCardImpl(GenericRequest<std::string>* request); | 613 void RemoveCreditCardImpl(GenericRequest<std::string>* request); |
609 void GetCreditCardsImpl(WebDataRequest* request); | 614 void GetCreditCardsImpl(WebDataRequest* request); |
610 void RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl( | 615 void RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl( |
611 GenericRequest2<base::Time, base::Time>* request); | 616 GenericRequest2<base::Time, base::Time>* request); |
612 | 617 |
613 // True once initialization has started. | 618 // True once initialization has started. |
614 bool is_running_; | 619 bool is_running_; |
615 | 620 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 // result can be NULL, if no result is expected or if the database could | 662 // result can be NULL, if no result is expected or if the database could |
658 // not be opened. The result object is destroyed after this call. | 663 // not be opened. The result object is destroyed after this call. |
659 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 664 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
660 const WDTypedResult* result) = 0; | 665 const WDTypedResult* result) = 0; |
661 | 666 |
662 protected: | 667 protected: |
663 virtual ~WebDataServiceConsumer() {} | 668 virtual ~WebDataServiceConsumer() {} |
664 }; | 669 }; |
665 | 670 |
666 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 671 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
OLD | NEW |