Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Unified Diff: components/sync/driver/glue/sync_backend_registrar.cc

Issue 2481313002: [Sync] Move sync thread ownership to ProfileSyncService. (Closed)
Patch Set: Address comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sync/driver/glue/sync_backend_registrar.cc
diff --git a/components/sync/driver/glue/sync_backend_registrar.cc b/components/sync/driver/glue/sync_backend_registrar.cc
index 3c832bbea7838e4fc763b147000db3f340944860..6d903a59f1a7f28c460b11086ebb9fa2af63d3bf 100644
--- a/components/sync/driver/glue/sync_backend_registrar.cc
+++ b/components/sync/driver/glue/sync_backend_registrar.cc
@@ -19,7 +19,6 @@ namespace syncer {
SyncBackendRegistrar::SyncBackendRegistrar(
const std::string& name,
SyncClient* sync_client,
- std::unique_ptr<base::Thread> sync_thread,
const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
const scoped_refptr<base::SingleThreadTaskRunner>& db_thread,
const scoped_refptr<base::SingleThreadTaskRunner>& file_thread)
@@ -31,14 +30,6 @@ SyncBackendRegistrar::SyncBackendRegistrar(
DCHECK(ui_thread_->BelongsToCurrentThread());
DCHECK(sync_client_);
- sync_thread_ = std::move(sync_thread);
- if (!sync_thread_) {
- sync_thread_ = base::MakeUnique<base::Thread>("Chrome_SyncThread");
- base::Thread::Options options;
- options.timer_slack = base::TIMER_SLACK_MAXIMUM;
- CHECK(sync_thread_->StartWithOptions(options));
- }
-
MaybeAddWorker(GROUP_DB);
MaybeAddWorker(GROUP_FILE);
MaybeAddWorker(GROUP_UI);
@@ -324,14 +315,6 @@ void SyncBackendRegistrar::MaybeAddWorker(ModelSafeGroup group) {
}
}
-std::unique_ptr<base::Thread> SyncBackendRegistrar::ReleaseSyncThread() {
- return std::move(sync_thread_);
-}
-
-base::Thread* SyncBackendRegistrar::sync_thread() {
- return sync_thread_.get();
-}
-
ModelSafeGroup SyncBackendRegistrar::GetInitialGroupForType(
ModelType type) const {
return non_blocking_types_.Has(type) ? GROUP_NON_BLOCKING : GROUP_PASSIVE;
« no previous file with comments | « components/sync/driver/glue/sync_backend_registrar.h ('k') | components/sync/driver/glue/sync_backend_registrar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698