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

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

Issue 2489433002: [Sync] Move thread checking into the ModelSafeWorker interface. (Closed)
Patch Set: Improve/add 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/ui_model_worker.cc
diff --git a/components/sync/driver/glue/ui_model_worker.cc b/components/sync/driver/glue/ui_model_worker.cc
index d9fccbe61902496e33a2e11d0b74c2aef8b7eba7..c812f9a9b54ed6b95cf0c974a3d07f778f2eac48 100644
--- a/components/sync/driver/glue/ui_model_worker.cc
+++ b/components/sync/driver/glue/ui_model_worker.cc
@@ -62,6 +62,10 @@ ModelSafeGroup UIModelWorker::GetModelSafeGroup() {
return GROUP_UI;
}
+bool UIModelWorker::IsOnModelThread() {
+ return ui_thread_->BelongsToCurrentThread();
+}
+
UIModelWorker::~UIModelWorker() {}
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698