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 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 5 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 autofill_backend_, guid)); | 122 autofill_backend_, guid)); |
123 } | 123 } |
124 | 124 |
125 WebDataServiceBase::Handle AutofillWebDataService::GetAutofillProfiles( | 125 WebDataServiceBase::Handle AutofillWebDataService::GetAutofillProfiles( |
126 WebDataServiceConsumer* consumer) { | 126 WebDataServiceConsumer* consumer) { |
127 return wdbs_->ScheduleDBTaskWithResult(FROM_HERE, | 127 return wdbs_->ScheduleDBTaskWithResult(FROM_HERE, |
128 Bind(&AutofillWebDataBackendImpl::GetAutofillProfiles, autofill_backend_), | 128 Bind(&AutofillWebDataBackendImpl::GetAutofillProfiles, autofill_backend_), |
129 consumer); | 129 consumer); |
130 } | 130 } |
131 | 131 |
| 132 void AutofillWebDataService::UpdateAutofillEntries( |
| 133 const std::vector<autofill::AutofillEntry>& autofill_entries) { |
| 134 wdbs_->ScheduleDBTask(FROM_HERE, |
| 135 Bind(&AutofillWebDataBackendImpl::UpdateAutofillEntries, |
| 136 autofill_backend_, |
| 137 autofill_entries)); |
| 138 } |
| 139 |
132 void AutofillWebDataService::AddCreditCard(const CreditCard& credit_card) { | 140 void AutofillWebDataService::AddCreditCard(const CreditCard& credit_card) { |
133 wdbs_->ScheduleDBTask( | 141 wdbs_->ScheduleDBTask( |
134 FROM_HERE, | 142 FROM_HERE, |
135 Bind(&AutofillWebDataBackendImpl::AddCreditCard, | 143 Bind(&AutofillWebDataBackendImpl::AddCreditCard, |
136 autofill_backend_, credit_card)); | 144 autofill_backend_, credit_card)); |
137 } | 145 } |
138 | 146 |
139 void AutofillWebDataService::UpdateCreditCard( | 147 void AutofillWebDataService::UpdateCreditCard( |
140 const CreditCard& credit_card) { | 148 const CreditCard& credit_card) { |
141 wdbs_->ScheduleDBTask( | 149 wdbs_->ScheduleDBTask( |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } | 223 } |
216 | 224 |
217 void AutofillWebDataService::NotifyAutofillMultipleChangedOnUIThread() { | 225 void AutofillWebDataService::NotifyAutofillMultipleChangedOnUIThread() { |
218 DCHECK(ui_thread_->BelongsToCurrentThread()); | 226 DCHECK(ui_thread_->BelongsToCurrentThread()); |
219 FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnUIThread, | 227 FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnUIThread, |
220 ui_observer_list_, | 228 ui_observer_list_, |
221 AutofillMultipleChanged()); | 229 AutofillMultipleChanged()); |
222 } | 230 } |
223 | 231 |
224 } // namespace autofill | 232 } // namespace autofill |
OLD | NEW |