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

Unified Diff: chrome/browser/sync/glue/password_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/history_model_worker.cc ('k') | chrome/browser/sync/glue/password_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/password_model_worker.h
diff --git a/chrome/browser/sync/glue/password_model_worker.h b/chrome/browser/sync/glue/password_model_worker.h
index d074b87da86453859d1e95f1871e7cc9b4e5494a..5fe13268a1be14f5da219bfdb9cfc8bbdf170718 100644
--- a/chrome/browser/sync/glue/password_model_worker.h
+++ b/chrome/browser/sync/glue/password_model_worker.h
@@ -25,14 +25,17 @@ namespace browser_sync {
// which is the DB thread on Linux and Windows.
class PasswordModelWorker : public syncer::ModelSafeWorker {
public:
- explicit PasswordModelWorker(
- const scoped_refptr<PasswordStore>& password_store);
+ PasswordModelWorker(const scoped_refptr<PasswordStore>& password_store,
+ syncer::WorkerLoopDestructionObserver* observer);
// 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;
+ protected:
+ virtual syncer::SyncerError DoWorkAndWaitUntilDoneImpl(
+ const syncer::WorkCallback& work) OVERRIDE;
+
private:
virtual ~PasswordModelWorker();
@@ -41,6 +44,10 @@ class PasswordModelWorker : public syncer::ModelSafeWorker {
base::WaitableEvent* done,
syncer::SyncerError* error);
+ // Called on password thread to add PasswordModelWorker as destruction
+ // observer.
+ void RegisterForPasswordLoopDestruction();
+
scoped_refptr<PasswordStore> password_store_;
DISALLOW_COPY_AND_ASSIGN(PasswordModelWorker);
};
« no previous file with comments | « chrome/browser/sync/glue/history_model_worker.cc ('k') | chrome/browser/sync/glue/password_model_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698