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

Unified Diff: chrome/browser/sync/glue/ui_model_worker.h

Issue 14046031: Worker changes to prepare for lock-free shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/sync_backend_registrar.cc ('k') | chrome/browser/sync/glue/ui_model_worker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/ui_model_worker.h
diff --git a/chrome/browser/sync/glue/ui_model_worker.h b/chrome/browser/sync/glue/ui_model_worker.h
index 8704ec4b836c0170ca42cfbb895e8f30932a58aa..8f7143360a6a9dc81577c980cdf5701e791b1e49 100644
--- a/chrome/browser/sync/glue/ui_model_worker.h
+++ b/chrome/browser/sync/glue/ui_model_worker.h
@@ -24,7 +24,7 @@ namespace browser_sync {
// after the actual syncer pthread has exited.
class UIModelWorker : public syncer::ModelSafeWorker {
public:
- UIModelWorker();
+ explicit UIModelWorker(syncer::WorkerLoopDestructionObserver* observer);
// Called by the UI thread on shutdown of the sync service. Blocks until
// the UIModelWorker has safely met termination conditions, namely that
@@ -33,8 +33,7 @@ class UIModelWorker : public syncer::ModelSafeWorker {
void Stop();
// syncer::ModelSafeWorker implementation. Called on syncapi SyncerThread.
- virtual syncer::SyncerError DoWorkAndWaitUntilDone(
- const syncer::WorkCallback& work) OVERRIDE;
+ virtual void RegisterForLoopDestruction() OVERRIDE;
virtual syncer::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
// Upon receiving this idempotent call, the syncer::ModelSafeWorker can
@@ -47,6 +46,10 @@ class UIModelWorker : public syncer::ModelSafeWorker {
// Called on ui loop.
void OnTaskCompleted() { pending_work_.Reset(); }
+ protected:
+ virtual syncer::SyncerError DoWorkAndWaitUntilDoneImpl(
+ const syncer::WorkCallback& work) OVERRIDE;
+
private:
// The life-cycle of a UIModelWorker in three states.
enum State {
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_registrar.cc ('k') | chrome/browser/sync/glue/ui_model_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698