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 { |