| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 ui_observer_list_.RemoveObserver(observer); | 267 ui_observer_list_.RemoveObserver(observer); |
| 268 } | 268 } |
| 269 | 269 |
| 270 base::SupportsUserData* AutofillWebDataService::GetDBUserData() { | 270 base::SupportsUserData* AutofillWebDataService::GetDBUserData() { |
| 271 DCHECK(db_thread_->BelongsToCurrentThread()); | 271 DCHECK(db_thread_->BelongsToCurrentThread()); |
| 272 return autofill_backend_->GetDBUserData(); | 272 return autofill_backend_->GetDBUserData(); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void AutofillWebDataService::GetAutofillBackend( | 275 void AutofillWebDataService::GetAutofillBackend( |
| 276 const base::Callback<void(AutofillWebDataBackend*)>& callback) { | 276 const base::Callback<void(AutofillWebDataBackend*)>& callback) { |
| 277 db_thread_->PostTask(FROM_HERE, base::Bind(callback, autofill_backend_)); | 277 db_thread_->PostTask( |
| 278 FROM_HERE, base::Bind(callback, base::RetainedRef(autofill_backend_))); |
| 278 } | 279 } |
| 279 | 280 |
| 280 AutofillWebDataService::~AutofillWebDataService() { | 281 AutofillWebDataService::~AutofillWebDataService() { |
| 281 } | 282 } |
| 282 | 283 |
| 283 void AutofillWebDataService::NotifyAutofillMultipleChangedOnUIThread() { | 284 void AutofillWebDataService::NotifyAutofillMultipleChangedOnUIThread() { |
| 284 DCHECK(ui_thread_->BelongsToCurrentThread()); | 285 DCHECK(ui_thread_->BelongsToCurrentThread()); |
| 285 FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnUIThread, | 286 FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnUIThread, |
| 286 ui_observer_list_, | 287 ui_observer_list_, |
| 287 AutofillMultipleChanged()); | 288 AutofillMultipleChanged()); |
| 288 } | 289 } |
| 289 | 290 |
| 290 } // namespace autofill | 291 } // namespace autofill |
| OLD | NEW |