| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 const base::Callback<void(AutofillWebDataBackend*)>& callback) { | 288 const base::Callback<void(AutofillWebDataBackend*)>& callback) { |
| 289 db_thread_->PostTask( | 289 db_thread_->PostTask( |
| 290 FROM_HERE, base::Bind(callback, base::RetainedRef(autofill_backend_))); | 290 FROM_HERE, base::Bind(callback, base::RetainedRef(autofill_backend_))); |
| 291 } | 291 } |
| 292 | 292 |
| 293 AutofillWebDataService::~AutofillWebDataService() { | 293 AutofillWebDataService::~AutofillWebDataService() { |
| 294 } | 294 } |
| 295 | 295 |
| 296 void AutofillWebDataService::NotifyAutofillMultipleChangedOnUIThread() { | 296 void AutofillWebDataService::NotifyAutofillMultipleChangedOnUIThread() { |
| 297 DCHECK(ui_thread_->BelongsToCurrentThread()); | 297 DCHECK(ui_thread_->BelongsToCurrentThread()); |
| 298 FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnUIThread, | 298 for (auto& ui_observer : ui_observer_list_) |
| 299 ui_observer_list_, | 299 ui_observer.AutofillMultipleChanged(); |
| 300 AutofillMultipleChanged()); | |
| 301 } | 300 } |
| 302 | 301 |
| 303 void AutofillWebDataService::NotifySyncStartedOnUIThread( | 302 void AutofillWebDataService::NotifySyncStartedOnUIThread( |
| 304 syncer::ModelType model_type) { | 303 syncer::ModelType model_type) { |
| 305 DCHECK(ui_thread_->BelongsToCurrentThread()); | 304 DCHECK(ui_thread_->BelongsToCurrentThread()); |
| 306 FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnUIThread, | 305 for (auto& ui_observer : ui_observer_list_) |
| 307 ui_observer_list_, | 306 ui_observer.SyncStarted(model_type); |
| 308 SyncStarted(model_type)); | |
| 309 } | 307 } |
| 310 | 308 |
| 311 } // namespace autofill | 309 } // namespace autofill |
| OLD | NEW |