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

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, 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 | « no previous file | chrome/browser/sync/glue/browser_thread_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/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..954a8af5ca3524b1eb13efd96cef2d501451eab0 100644
--- a/chrome/browser/sync/glue/browser_thread_model_worker.h
+++ b/chrome/browser/sync/glue/browser_thread_model_worker.h
@@ -20,21 +20,24 @@ 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::WorkerLoopDestructionObserver* 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 DoWorkAndWaitUntilDoneImpl(
+ const syncer::WorkCallback& work) 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 +58,7 @@ class BrowserThreadModelWorker : public syncer::ModelSafeWorker {
class DatabaseModelWorker : public BrowserThreadModelWorker {
public:
- DatabaseModelWorker();
+ explicit DatabaseModelWorker(syncer::WorkerLoopDestructionObserver* observer);
protected:
virtual void CallDoWorkAndSignalTask(
@@ -69,7 +72,7 @@ class DatabaseModelWorker : public BrowserThreadModelWorker {
class FileModelWorker : public BrowserThreadModelWorker {
public:
- FileModelWorker();
+ explicit FileModelWorker(syncer::WorkerLoopDestructionObserver* observer);
protected:
virtual void CallDoWorkAndSignalTask(
« no previous file with comments | « no previous file | chrome/browser/sync/glue/browser_thread_model_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698