| Index: chrome/browser/sync/glue/sync_backend_registrar.cc
|
| diff --git a/chrome/browser/sync/glue/sync_backend_registrar.cc b/chrome/browser/sync/glue/sync_backend_registrar.cc
|
| index 47ee4a4865d7d422022cea6ea6a1c3fe05dc66f1..a553fe8bcc8caac90707a0f794cc46321f1eea98 100644
|
| --- a/chrome/browser/sync/glue/sync_backend_registrar.cc
|
| +++ b/chrome/browser/sync/glue/sync_backend_registrar.cc
|
| @@ -59,27 +59,29 @@ SyncBackendRegistrar::SyncBackendRegistrar(
|
| name_(name),
|
| profile_(profile),
|
| sync_loop_(sync_loop),
|
| - ui_worker_(new UIModelWorker()),
|
| + ui_worker_(new UIModelWorker(this)),
|
| stopped_on_ui_thread_(false) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| CHECK(profile_);
|
| DCHECK(sync_loop_);
|
| - workers_[syncer::GROUP_DB] = new DatabaseModelWorker();
|
| - workers_[syncer::GROUP_FILE] = new FileModelWorker();
|
| + workers_[syncer::GROUP_DB] = new DatabaseModelWorker(this);
|
| + workers_[syncer::GROUP_FILE] = new FileModelWorker(this);
|
| workers_[syncer::GROUP_UI] = ui_worker_;
|
| - workers_[syncer::GROUP_PASSIVE] = new syncer::PassiveModelWorker(sync_loop_);
|
| + workers_[syncer::GROUP_PASSIVE] = new syncer::PassiveModelWorker(sync_loop_,
|
| + this);
|
|
|
| HistoryService* history_service =
|
| HistoryServiceFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS);
|
| if (history_service) {
|
| workers_[syncer::GROUP_HISTORY] =
|
| - new HistoryModelWorker(history_service->AsWeakPtr());
|
| + new HistoryModelWorker(history_service->AsWeakPtr(), this);
|
| }
|
|
|
| scoped_refptr<PasswordStore> password_store =
|
| PasswordStoreFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS);
|
| if (password_store) {
|
| - workers_[syncer::GROUP_PASSWORD] = new PasswordModelWorker(password_store);
|
| + workers_[syncer::GROUP_PASSWORD] = new PasswordModelWorker(password_store,
|
| + this);
|
| }
|
| }
|
|
|
| @@ -295,4 +297,8 @@ bool SyncBackendRegistrar::IsCurrentThreadSafeForModel(
|
| GetGroupForModelType(model_type, routing_info_));
|
| }
|
|
|
| +void SyncBackendRegistrar::OnWorkerLoopDestroyed(syncer::ModelSafeGroup group) {
|
| + // Do nothing for now.
|
| +}
|
| +
|
| } // namespace browser_sync
|
|
|