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

Unified Diff: chrome/browser/sync/glue/browser_thread_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, 8 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
Index: chrome/browser/sync/glue/browser_thread_model_worker.h
diff --git a/chrome/browser/sync/glue/browser_thread_model_worker.h b/chrome/browser/sync/glue/browser_thread_model_worker.h
index 639ec36906658ae26af311f9ec1f97f9d7ed2ef6..270a27a809d2623d614f8072af9e4b722f27ba58 100644
--- a/chrome/browser/sync/glue/browser_thread_model_worker.h
+++ b/chrome/browser/sync/glue/browser_thread_model_worker.h
@@ -20,21 +20,25 @@ namespace browser_sync {
// A syncer::ModelSafeWorker for models that accept requests from the
// syncapi that need to be fulfilled on a browser thread, for example
-// autofill on the DB thread. TODO(sync): Try to generalize other
-// ModelWorkers (e.g. history, etc).
+// autofill on the DB thread.
+// TODO(sync): Try to generalize other ModelWorkers (e.g. history, etc).
class BrowserThreadModelWorker : public syncer::ModelSafeWorker {
public:
BrowserThreadModelWorker(content::BrowserThread::ID thread,
- syncer::ModelSafeGroup group);
+ syncer::ModelSafeGroup group,
+ syncer::WorkerObserver* observer);
// syncer::ModelSafeWorker implementation. Called on the sync thread.
- virtual syncer::SyncerError DoWorkAndWaitUntilDone(
- const syncer::WorkCallback& work) OVERRIDE;
+ virtual void RegisterForLoopDestruction() OVERRIDE;
virtual syncer::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
protected:
virtual ~BrowserThreadModelWorker();
+ virtual syncer::SyncerError DoWorkAndWaitUntilDone(
+ const syncer::WorkCallback& work,
+ base::WaitableEvent* done) OVERRIDE;
+
// Marked pure virtual so subclasses have to override, but there is
// an implementation that subclasses should use. This is so that
// (subclass)::CallDoWorkAndSignalTask shows up in callstacks.
@@ -55,7 +59,7 @@ class BrowserThreadModelWorker : public syncer::ModelSafeWorker {
class DatabaseModelWorker : public BrowserThreadModelWorker {
public:
- DatabaseModelWorker();
+ DatabaseModelWorker(syncer::WorkerObserver* observer);
protected:
virtual void CallDoWorkAndSignalTask(
@@ -69,7 +73,7 @@ class DatabaseModelWorker : public BrowserThreadModelWorker {
class FileModelWorker : public BrowserThreadModelWorker {
public:
- FileModelWorker();
+ FileModelWorker(syncer::WorkerObserver* observer);
protected:
virtual void CallDoWorkAndSignalTask(

Powered by Google App Engine
This is Rietveld 408576698