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

Side by Side Diff: chrome/browser/sync/glue/password_model_worker.h

Issue 1851004: Adding sync support for Passwords (Closed)
Patch Set: Ready for checkin Created 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_WORKER_H_
6 #define CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_WORKER_H_
7
8 #include "chrome/browser/sync/engine/model_safe_worker.h"
9
10 #include "base/basictypes.h"
11 #include "base/ref_counted.h"
12 #include "chrome/browser/sync/util/closure.h"
13
14 class PasswordStore;
15
16 namespace base {
17 class WaitableEvent;
18 }
19
20 namespace browser_sync {
21
22 // A ModelSafeWorker for password models that accepts requests
23 // from the syncapi that need to be fulfilled on the password thread,
24 // which is the DB thread on Linux and Windows.
25 class PasswordModelWorker : public browser_sync::ModelSafeWorker {
26 public:
27 explicit PasswordModelWorker(PasswordStore* password_store);
28
29 // ModelSafeWorker implementation. Called on syncapi SyncerThread.
30 void DoWorkAndWaitUntilDone(Closure* work);
31 virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_PASSWORD; }
32 virtual bool CurrentThreadIsWorkThread();
33
34 private:
35 void CallDoWorkAndSignalTask(Closure* work, base::WaitableEvent* done);
36
37 scoped_refptr<PasswordStore> password_store_;
38 DISALLOW_COPY_AND_ASSIGN(PasswordModelWorker);
39 };
40
41 } // namespace browser_sync
42
43 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_WORKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/password_model_associator.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