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 #ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_ |
6 #define CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_ | 6 #define CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "chrome/browser/api/webdata/autofill_web_data_service.h" | 9 #include "chrome/browser/api/webdata/autofill_web_data_service.h" |
10 #include "chrome/browser/api/webdata/web_data_results.h" | 10 #include "chrome/browser/api/webdata/web_data_results.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 virtual content::NotificationSource GetNotificationSource() OVERRIDE; | 26 virtual content::NotificationSource GetNotificationSource() OVERRIDE; |
27 | 27 |
28 // AutofillWebData implementation. | 28 // AutofillWebData implementation. |
29 virtual void AddFormFields( | 29 virtual void AddFormFields( |
30 const std::vector<FormFieldData>& fields) OVERRIDE; | 30 const std::vector<FormFieldData>& fields) OVERRIDE; |
31 virtual WebDataServiceBase::Handle GetFormValuesForElementName( | 31 virtual WebDataServiceBase::Handle GetFormValuesForElementName( |
32 const string16& name, | 32 const string16& name, |
33 const string16& prefix, | 33 const string16& prefix, |
34 int limit, | 34 int limit, |
35 WebDataServiceConsumer* consumer) OVERRIDE; | 35 WebDataServiceConsumer* consumer) OVERRIDE; |
| 36 virtual void RemoveFormElementsAddedBetween( |
| 37 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; |
36 virtual void RemoveExpiredFormElements() OVERRIDE; | 38 virtual void RemoveExpiredFormElements() OVERRIDE; |
37 virtual void RemoveFormValueForElementName(const string16& name, | 39 virtual void RemoveFormValueForElementName(const string16& name, |
38 const string16& value) OVERRIDE; | 40 const string16& value) OVERRIDE; |
39 virtual void AddAutofillProfile(const AutofillProfile& profile) OVERRIDE; | 41 virtual void AddAutofillProfile(const AutofillProfile& profile) OVERRIDE; |
40 virtual void UpdateAutofillProfile(const AutofillProfile& profile) OVERRIDE; | 42 virtual void UpdateAutofillProfile(const AutofillProfile& profile) OVERRIDE; |
41 virtual void RemoveAutofillProfile(const std::string& guid) OVERRIDE; | 43 virtual void RemoveAutofillProfile(const std::string& guid) OVERRIDE; |
42 virtual WebDataServiceBase::Handle GetAutofillProfiles( | 44 virtual WebDataServiceBase::Handle GetAutofillProfiles( |
43 WebDataServiceConsumer* consumer) OVERRIDE; | 45 WebDataServiceConsumer* consumer) OVERRIDE; |
44 virtual void AddCreditCard(const CreditCard& credit_card) OVERRIDE; | 46 virtual void AddCreditCard(const CreditCard& credit_card) OVERRIDE; |
45 virtual void UpdateCreditCard(const CreditCard& credit_card) OVERRIDE; | 47 virtual void UpdateCreditCard(const CreditCard& credit_card) OVERRIDE; |
46 virtual void RemoveCreditCard(const std::string& guid) OVERRIDE; | 48 virtual void RemoveCreditCard(const std::string& guid) OVERRIDE; |
47 virtual WebDataServiceBase::Handle | 49 virtual WebDataServiceBase::Handle GetCreditCards( |
48 GetCreditCards(WebDataServiceConsumer* consumer) OVERRIDE; | 50 WebDataServiceConsumer* consumer) OVERRIDE; |
| 51 virtual void RemoveAutofillDataModifiedBetween( |
| 52 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; |
| 53 |
49 | 54 |
50 protected: | 55 protected: |
51 virtual ~AutofillWebDataServiceImpl(); | 56 virtual ~AutofillWebDataServiceImpl(); |
52 | 57 |
53 private: | 58 private: |
54 WebDatabase::State AddFormElementsImpl( | 59 WebDatabase::State AddFormElementsImpl( |
55 const std::vector<FormFieldData>& fields, WebDatabase* db); | 60 const std::vector<FormFieldData>& fields, WebDatabase* db); |
56 scoped_ptr<WDTypedResult> GetFormValuesForElementNameImpl( | 61 scoped_ptr<WDTypedResult> GetFormValuesForElementNameImpl( |
57 const string16& name, const string16& prefix, int limit, WebDatabase* db); | 62 const string16& name, const string16& prefix, int limit, WebDatabase* db); |
58 WebDatabase::State RemoveFormElementsAddedBetweenImpl( | 63 WebDatabase::State RemoveFormElementsAddedBetweenImpl( |
59 const base::Time& delete_begin, const base::Time& delete_end, | 64 const base::Time& delete_begin, const base::Time& delete_end, |
60 WebDatabase* db); | 65 WebDatabase* db); |
61 WebDatabase::State RemoveExpiredFormElementsImpl(WebDatabase* db); | 66 WebDatabase::State RemoveExpiredFormElementsImpl(WebDatabase* db); |
62 WebDatabase::State RemoveFormValueForElementNameImpl( | 67 WebDatabase::State RemoveFormValueForElementNameImpl( |
63 const string16& name, const string16& value, WebDatabase* db); | 68 const string16& name, const string16& value, WebDatabase* db); |
64 WebDatabase::State AddAutofillProfileImpl( | 69 WebDatabase::State AddAutofillProfileImpl( |
65 const AutofillProfile& profile, WebDatabase* db); | 70 const AutofillProfile& profile, WebDatabase* db); |
66 WebDatabase::State UpdateAutofillProfileImpl( | 71 WebDatabase::State UpdateAutofillProfileImpl( |
67 const AutofillProfile& profile, WebDatabase* db); | 72 const AutofillProfile& profile, WebDatabase* db); |
68 WebDatabase::State RemoveAutofillProfileImpl( | 73 WebDatabase::State RemoveAutofillProfileImpl( |
69 const std::string& guid, WebDatabase* db); | 74 const std::string& guid, WebDatabase* db); |
70 scoped_ptr<WDTypedResult> GetAutofillProfilesImpl(WebDatabase* db); | 75 scoped_ptr<WDTypedResult> GetAutofillProfilesImpl(WebDatabase* db); |
71 WebDatabase::State AddCreditCardImpl( | 76 WebDatabase::State AddCreditCardImpl( |
72 const CreditCard& credit_card, WebDatabase* db); | 77 const CreditCard& credit_card, WebDatabase* db); |
73 WebDatabase::State UpdateCreditCardImpl( | 78 WebDatabase::State UpdateCreditCardImpl( |
74 const CreditCard& credit_card, WebDatabase* db); | 79 const CreditCard& credit_card, WebDatabase* db); |
75 WebDatabase::State RemoveCreditCardImpl( | 80 WebDatabase::State RemoveCreditCardImpl( |
76 const std::string& guid, WebDatabase* db); | 81 const std::string& guid, WebDatabase* db); |
77 scoped_ptr<WDTypedResult> GetCreditCardsImpl(WebDatabase* db); | 82 scoped_ptr<WDTypedResult> GetCreditCardsImpl(WebDatabase* db); |
| 83 WebDatabase::State RemoveAutofillDataModifiedBetweenImpl( |
| 84 const base::Time& delete_begin, const base::Time& delete_end, |
| 85 WebDatabase* db); |
78 | 86 |
79 // Callbacks to ensure that sensitive info is destroyed if request is | 87 // Callbacks to ensure that sensitive info is destroyed if request is |
80 // cancelled. | 88 // cancelled. |
81 void DestroyAutofillProfileResult(const WDTypedResult* result); | 89 void DestroyAutofillProfileResult(const WDTypedResult* result); |
82 void DestroyAutofillCreditCardResult(const WDTypedResult* result); | 90 void DestroyAutofillCreditCardResult(const WDTypedResult* result); |
83 | 91 |
84 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataServiceImpl); | 92 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataServiceImpl); |
85 }; | 93 }; |
86 | 94 |
87 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_ | 95 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_ |
OLD | NEW |