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 #include "components/autofill/browser/webdata/autofill_webdata_service.h" | 5 #include "components/autofill/browser/webdata/autofill_webdata_service.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "components/autofill/browser/autofill_country.h" | 9 #include "components/autofill/browser/autofill_country.h" |
10 #include "components/autofill/browser/autofill_profile.h" | 10 #include "components/autofill/browser/autofill_profile.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 | 66 |
67 WebDataServiceBase::Handle AutofillWebDataService::GetFormValuesForElementName( | 67 WebDataServiceBase::Handle AutofillWebDataService::GetFormValuesForElementName( |
68 const base::string16& name, const base::string16& prefix, int limit, | 68 const base::string16& name, const base::string16& prefix, int limit, |
69 WebDataServiceConsumer* consumer) { | 69 WebDataServiceConsumer* consumer) { |
70 return wdbs_->ScheduleDBTaskWithResult(FROM_HERE, | 70 return wdbs_->ScheduleDBTaskWithResult(FROM_HERE, |
71 Bind(&AutofillWebDataBackend::GetFormValuesForElementName, | 71 Bind(&AutofillWebDataBackend::GetFormValuesForElementName, |
72 autofill_backend_, name, prefix, limit), consumer); | 72 autofill_backend_, name, prefix, limit), consumer); |
73 } | 73 } |
74 | 74 |
| 75 WebDataServiceBase::Handle AutofillWebDataService::HasFormElements( |
| 76 WebDataServiceConsumer* consumer) { |
| 77 return wdbs_->ScheduleDBTaskWithResult(FROM_HERE, |
| 78 Bind(&AutofillWebDataBackend::HasFormElements, autofill_backend_), |
| 79 consumer); |
| 80 } |
| 81 |
75 void AutofillWebDataService::RemoveFormElementsAddedBetween( | 82 void AutofillWebDataService::RemoveFormElementsAddedBetween( |
76 const Time& delete_begin, const Time& delete_end) { | 83 const Time& delete_begin, const Time& delete_end) { |
77 wdbs_->ScheduleDBTask(FROM_HERE, | 84 wdbs_->ScheduleDBTask(FROM_HERE, |
78 Bind(&AutofillWebDataBackend::RemoveFormElementsAddedBetween, | 85 Bind(&AutofillWebDataBackend::RemoveFormElementsAddedBetween, |
79 autofill_backend_, delete_begin, delete_end)); | 86 autofill_backend_, delete_begin, delete_end)); |
80 } | 87 } |
81 | 88 |
82 void AutofillWebDataService::RemoveExpiredFormElements() { | 89 void AutofillWebDataService::RemoveExpiredFormElements() { |
83 wdbs_->ScheduleDBTask(FROM_HERE, | 90 wdbs_->ScheduleDBTask(FROM_HERE, |
84 Bind(&AutofillWebDataBackend::RemoveExpiredFormElements, | 91 Bind(&AutofillWebDataBackend::RemoveExpiredFormElements, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 207 } |
201 | 208 |
202 void AutofillWebDataService::NotifyAutofillMultipleChangedOnUIThread() { | 209 void AutofillWebDataService::NotifyAutofillMultipleChangedOnUIThread() { |
203 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 210 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
204 FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnUIThread, | 211 FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnUIThread, |
205 ui_observer_list_, | 212 ui_observer_list_, |
206 AutofillMultipleChanged()); | 213 AutofillMultipleChanged()); |
207 } | 214 } |
208 | 215 |
209 } // namespace autofill | 216 } // namespace autofill |
OLD | NEW |