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

Unified Diff: components/sync/driver/glue/sync_backend_host_impl.h

Issue 2538023002: [Sync] Pass a TaskRunner into SBHI/SBHC, not a thread or message loop. (Closed)
Patch Set: 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_host_impl.h
diff --git a/components/sync/driver/glue/sync_backend_host_impl.h b/components/sync/driver/glue/sync_backend_host_impl.h
index 96849f54a8be5ca24db0778e42d65700309e779c..4035e753af05edf4163341499ad2cdc1a99eab53 100644
--- a/components/sync/driver/glue/sync_backend_host_impl.h
+++ b/components/sync/driver/glue/sync_backend_host_impl.h
@@ -71,7 +71,7 @@ class SyncBackendHostImpl : public SyncBackendHost, public InvalidationHandler {
// SyncBackendHost implementation.
void Initialize(
SyncFrontend* frontend,
- base::Thread* sync_thread,
+ scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner,
const WeakHandle<JsEventHandler>& event_handler,
const GURL& service_url,
const std::string& sync_user_agent,
@@ -294,8 +294,8 @@ class SyncBackendHostImpl : public SyncBackendHost, public InvalidationHandler {
SyncClient* const sync_client_;
- // A pointer to the sync thread.
- base::Thread* sync_thread_;
+ // The task runner where all the sync engine operations happen.
+ scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner_;
// The UI thread's task runner.
const scoped_refptr<base::SingleThreadTaskRunner> ui_thread_;

Powered by Google App Engine
This is Rietveld 408576698