| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_ |
| 6 #define CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "chrome/browser/api/webdata/autofill_web_data_service.h" |
| 10 |
| 11 class WebDataService; |
| 12 |
| 13 // This aggregates a WebDataService and delegates all method calls to |
| 14 // it. |
| 15 class AutofillWebDataServiceImpl : public AutofillWebDataService { |
| 16 public: |
| 17 explicit AutofillWebDataServiceImpl(scoped_refptr<WebDataService> service); |
| 18 virtual ~AutofillWebDataServiceImpl(); |
| 19 |
| 20 // AutofillWebData implementation. |
| 21 virtual void AddFormFields( |
| 22 const std::vector<webkit::forms::FormField>& fields) OVERRIDE; |
| 23 virtual WebDataServiceBase::Handle GetFormValuesForElementName( |
| 24 const string16& name, |
| 25 const string16& prefix, |
| 26 int limit, |
| 27 WebDataServiceConsumer* consumer) OVERRIDE; |
| 28 virtual void RemoveExpiredFormElements() OVERRIDE; |
| 29 virtual void RemoveFormValueForElementName(const string16& name, |
| 30 const string16& value) OVERRIDE; |
| 31 virtual void AddAutofillProfile(const AutofillProfile& profile) OVERRIDE; |
| 32 virtual void UpdateAutofillProfile(const AutofillProfile& profile) OVERRIDE; |
| 33 virtual void RemoveAutofillProfile(const std::string& guid) OVERRIDE; |
| 34 virtual WebDataServiceBase::Handle GetAutofillProfiles( |
| 35 WebDataServiceConsumer* consumer) OVERRIDE; |
| 36 virtual void EmptyMigrationTrash(bool notify_sync) OVERRIDE; |
| 37 virtual void AddCreditCard(const CreditCard& credit_card) OVERRIDE; |
| 38 virtual void UpdateCreditCard(const CreditCard& credit_card) OVERRIDE; |
| 39 virtual void RemoveCreditCard(const std::string& guid) OVERRIDE; |
| 40 virtual WebDataServiceBase::Handle |
| 41 GetCreditCards(WebDataServiceConsumer* consumer) OVERRIDE; |
| 42 |
| 43 // WebDataServiceBase implementation. |
| 44 virtual void CancelRequest(Handle h) OVERRIDE; |
| 45 virtual content::NotificationSource GetNotificationSource() OVERRIDE; |
| 46 |
| 47 private: |
| 48 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataServiceImpl); |
| 49 |
| 50 const scoped_refptr<WebDataService> service_; |
| 51 }; |
| 52 |
| 53 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_ |
| OLD | NEW |