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

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

Issue 637413003: Sync: Avoid deadlock in SyncBackendRegistrar / ModelSafeWorker on sync backend shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 6 years, 2 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 | « chrome/browser/sync/glue/ui_model_worker.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 02f3ca1fa2b18f8ce100ffedbda7342b5edc2e99..b7e2b16afa87b9414c821e2a2b2e46400e11b50b 100644
--- a/sync/internal_api/public/engine/model_safe_worker.h
+++ b/sync/internal_api/public/engine/model_safe_worker.h
@@ -133,7 +133,12 @@ class SYNC_EXPORT ModelSafeWorker
// observation from sync thread when shutting down sync.
base::Lock working_loop_lock_;
base::MessageLoop* working_loop_;
- base::WaitableEvent working_loop_set_wait_;
+ // Callback passed with UnregisterForLoopDestruction. Normally this
Nicolas Zea 2014/10/17 16:16:52 nit: newline above
+ // remains unset/unused and is stored only if |working_loop_| 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.
+ base::Callback<void(ModelSafeGroup)> unregister_done_callback_;
};
// A map that details which ModelSafeGroup each ModelType
« no previous file with comments | « chrome/browser/sync/glue/ui_model_worker.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