| 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/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 autofill_backend_, credit_card)); | 167 autofill_backend_, credit_card)); |
| 168 } | 168 } |
| 169 | 169 |
| 170 void AutofillWebDataService::RemoveCreditCard(const std::string& guid) { | 170 void AutofillWebDataService::RemoveCreditCard(const std::string& guid) { |
| 171 wdbs_->ScheduleDBTask( | 171 wdbs_->ScheduleDBTask( |
| 172 FROM_HERE, | 172 FROM_HERE, |
| 173 Bind(&AutofillWebDataBackendImpl::RemoveCreditCard, | 173 Bind(&AutofillWebDataBackendImpl::RemoveCreditCard, |
| 174 autofill_backend_, guid)); | 174 autofill_backend_, guid)); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void AutofillWebDataService::AddServerCreditCard( |
| 178 const CreditCard& credit_card) { |
| 179 wdbs_->ScheduleDBTask(FROM_HERE, |
| 180 Bind(&AutofillWebDataBackendImpl::AddServerCreditCard, |
| 181 autofill_backend_, credit_card)); |
| 182 } |
| 183 |
| 177 WebDataServiceBase::Handle AutofillWebDataService::GetCreditCards( | 184 WebDataServiceBase::Handle AutofillWebDataService::GetCreditCards( |
| 178 WebDataServiceConsumer* consumer) { | 185 WebDataServiceConsumer* consumer) { |
| 179 return wdbs_->ScheduleDBTaskWithResult(FROM_HERE, | 186 return wdbs_->ScheduleDBTaskWithResult(FROM_HERE, |
| 180 Bind(&AutofillWebDataBackendImpl::GetCreditCards, autofill_backend_), | 187 Bind(&AutofillWebDataBackendImpl::GetCreditCards, autofill_backend_), |
| 181 consumer); | 188 consumer); |
| 182 } | 189 } |
| 183 | 190 |
| 184 WebDataServiceBase::Handle AutofillWebDataService::GetServerCreditCards( | 191 WebDataServiceBase::Handle AutofillWebDataService::GetServerCreditCards( |
| 185 WebDataServiceConsumer* consumer) { | 192 WebDataServiceConsumer* consumer) { |
| 186 return wdbs_->ScheduleDBTaskWithResult(FROM_HERE, | 193 return wdbs_->ScheduleDBTaskWithResult(FROM_HERE, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 } | 297 } |
| 291 | 298 |
| 292 void AutofillWebDataService::NotifySyncStartedOnUIThread( | 299 void AutofillWebDataService::NotifySyncStartedOnUIThread( |
| 293 syncer::ModelType model_type) { | 300 syncer::ModelType model_type) { |
| 294 DCHECK(ui_thread_->BelongsToCurrentThread()); | 301 DCHECK(ui_thread_->BelongsToCurrentThread()); |
| 295 for (auto& ui_observer : ui_observer_list_) | 302 for (auto& ui_observer : ui_observer_list_) |
| 296 ui_observer.SyncStarted(model_type); | 303 ui_observer.SyncStarted(model_type); |
| 297 } | 304 } |
| 298 | 305 |
| 299 } // namespace autofill | 306 } // namespace autofill |
| OLD | NEW |