| 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_SERVICE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "base/supports_user_data.h" | 13 #include "base/supports_user_data.h" |
| 14 #include "components/autofill/core/browser/webdata/autofill_webdata.h" | 14 #include "components/autofill/core/browser/webdata/autofill_webdata.h" |
| 15 #include "components/autofill/core/common/form_field_data.h" | 15 #include "components/autofill/core/common/form_field_data.h" |
| 16 #include "components/webdata/common/web_data_results.h" | 16 #include "components/webdata/common/web_data_results.h" |
| 17 #include "components/webdata/common/web_data_service_base.h" | 17 #include "components/webdata/common/web_data_service_base.h" |
| 18 #include "components/webdata/common/web_data_service_consumer.h" | 18 #include "components/webdata/common/web_data_service_consumer.h" |
| 19 #include "components/webdata/common/web_database.h" | 19 #include "components/webdata/common/web_database.h" |
| 20 | 20 |
| 21 class WebDatabaseService; | 21 class WebDatabaseService; |
| 22 | 22 |
| 23 namespace base { | 23 namespace base { |
| 24 class MessageLoopProxy; | 24 class MessageLoopProxy; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace autofill { | 27 namespace autofill { |
| 28 | 28 |
| 29 class AutofillChange; | 29 class AutofillChange; |
| 30 class AutofillEntry; |
| 30 class AutofillProfile; | 31 class AutofillProfile; |
| 31 class AutofillWebDataBackend; | 32 class AutofillWebDataBackend; |
| 32 class AutofillWebDataBackendImpl; | 33 class AutofillWebDataBackendImpl; |
| 33 class AutofillWebDataServiceObserverOnDBThread; | 34 class AutofillWebDataServiceObserverOnDBThread; |
| 34 class AutofillWebDataServiceObserverOnUIThread; | 35 class AutofillWebDataServiceObserverOnUIThread; |
| 35 class CreditCard; | 36 class CreditCard; |
| 36 | 37 |
| 37 // API for Autofill web data. | 38 // API for Autofill web data. |
| 38 class AutofillWebDataService : public AutofillWebData, | 39 class AutofillWebDataService : public AutofillWebData, |
| 39 public WebDataServiceBase { | 40 public WebDataServiceBase { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 62 virtual void RemoveFormElementsAddedBetween( | 63 virtual void RemoveFormElementsAddedBetween( |
| 63 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; | 64 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; |
| 64 virtual void RemoveFormValueForElementName( | 65 virtual void RemoveFormValueForElementName( |
| 65 const base::string16& name, | 66 const base::string16& name, |
| 66 const base::string16& value) OVERRIDE; | 67 const base::string16& value) OVERRIDE; |
| 67 virtual void AddAutofillProfile(const AutofillProfile& profile) OVERRIDE; | 68 virtual void AddAutofillProfile(const AutofillProfile& profile) OVERRIDE; |
| 68 virtual void UpdateAutofillProfile(const AutofillProfile& profile) OVERRIDE; | 69 virtual void UpdateAutofillProfile(const AutofillProfile& profile) OVERRIDE; |
| 69 virtual void RemoveAutofillProfile(const std::string& guid) OVERRIDE; | 70 virtual void RemoveAutofillProfile(const std::string& guid) OVERRIDE; |
| 70 virtual WebDataServiceBase::Handle GetAutofillProfiles( | 71 virtual WebDataServiceBase::Handle GetAutofillProfiles( |
| 71 WebDataServiceConsumer* consumer) OVERRIDE; | 72 WebDataServiceConsumer* consumer) OVERRIDE; |
| 73 virtual void UpdateAutofillEntries( |
| 74 const std::vector<AutofillEntry>& autofill_entries) OVERRIDE; |
| 72 virtual void AddCreditCard(const CreditCard& credit_card) OVERRIDE; | 75 virtual void AddCreditCard(const CreditCard& credit_card) OVERRIDE; |
| 73 virtual void UpdateCreditCard(const CreditCard& credit_card) OVERRIDE; | 76 virtual void UpdateCreditCard(const CreditCard& credit_card) OVERRIDE; |
| 74 virtual void RemoveCreditCard(const std::string& guid) OVERRIDE; | 77 virtual void RemoveCreditCard(const std::string& guid) OVERRIDE; |
| 75 virtual WebDataServiceBase::Handle GetCreditCards( | 78 virtual WebDataServiceBase::Handle GetCreditCards( |
| 76 WebDataServiceConsumer* consumer) OVERRIDE; | 79 WebDataServiceConsumer* consumer) OVERRIDE; |
| 77 virtual void RemoveAutofillDataModifiedBetween( | 80 virtual void RemoveAutofillDataModifiedBetween( |
| 78 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; | 81 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; |
| 79 virtual void RemoveOriginURLsModifiedBetween( | 82 virtual void RemoveOriginURLsModifiedBetween( |
| 80 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; | 83 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; |
| 81 | 84 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 base::WeakPtrFactory<AutofillWebDataService> weak_ptr_factory_; | 123 base::WeakPtrFactory<AutofillWebDataService> weak_ptr_factory_; |
| 121 | 124 |
| 122 scoped_refptr<AutofillWebDataBackendImpl> autofill_backend_; | 125 scoped_refptr<AutofillWebDataBackendImpl> autofill_backend_; |
| 123 | 126 |
| 124 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataService); | 127 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataService); |
| 125 }; | 128 }; |
| 126 | 129 |
| 127 } // namespace autofill | 130 } // namespace autofill |
| 128 | 131 |
| 129 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_ | 132 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_ |
| OLD | NEW |