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

Unified Diff: sync/internal_api/public/engine/model_safe_worker.h

Issue 2083713002: Remove calls to MessageLoop::current() in sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self-review Created 4 years, 6 months 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
« no previous file with comments | « sync/internal_api/http_bridge_unittest.cc ('k') | sync/internal_api/public/engine/model_safe_worker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/engine/model_safe_worker.h
diff --git a/sync/internal_api/public/engine/model_safe_worker.h b/sync/internal_api/public/engine/model_safe_worker.h
index 1e016a4881be9a875accdd5b8861c564e3d3669c..87662db834d7dcd909e9bf23e1bcf987e47c3ffd 100644
--- a/sync/internal_api/public/engine/model_safe_worker.h
+++ b/sync/internal_api/public/engine/model_safe_worker.h
@@ -13,6 +13,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
#include "sync/base/sync_export.h"
@@ -135,11 +136,11 @@ class SYNC_EXPORT ModelSafeWorker
// Remember working loop for posting task to unregister destruction
// observation from sync thread when shutting down sync.
- base::Lock working_loop_lock_;
- base::MessageLoop* working_loop_;
+ base::Lock working_task_runner_lock_;
+ scoped_refptr<base::SingleThreadTaskRunner> working_task_runner_;
// Callback passed with UnregisterForLoopDestruction. Normally this
- // remains unset/unused and is stored only if |working_loop_| isn't
+ // remains unset/unused and is stored only if |working_task_runner_| isn't
// initialized by the time UnregisterForLoopDestruction is called.
// It is safe to copy and thread safe.
// See comments in model_safe_worker.cc for more details.
« no previous file with comments | « sync/internal_api/http_bridge_unittest.cc ('k') | sync/internal_api/public/engine/model_safe_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698