OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_ | |
6 #define CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_ | |
7 #pragma once | |
8 | |
9 #include <vector> | |
10 | |
11 #include "base/compiler_specific.h" | |
12 #include "base/memory/ref_counted.h" | |
13 #include "chrome/browser/sync/engine/model_safe_worker.h" | |
14 #include "chrome/browser/sync/syncable/model_type.h" | |
15 | |
16 namespace browser_sync { | |
17 | |
18 class MockUIModelWorker : public ModelSafeWorker { | |
19 public: | |
20 virtual ModelSafeGroup GetModelSafeGroup() OVERRIDE; | |
21 }; | |
22 | |
23 class MockDBModelWorker : public ModelSafeWorker { | |
24 public: | |
25 virtual ModelSafeGroup GetModelSafeGroup() OVERRIDE; | |
26 }; | |
27 | |
28 class MockFileModelWorker : public ModelSafeWorker { | |
29 public: | |
30 virtual ModelSafeGroup GetModelSafeGroup() OVERRIDE; | |
31 }; | |
32 | |
33 class MockModelSafeWorkerRegistrar : public ModelSafeWorkerRegistrar { | |
34 public: | |
35 virtual ~MockModelSafeWorkerRegistrar(); | |
36 static MockModelSafeWorkerRegistrar* PassiveBookmarks(); | |
37 static MockModelSafeWorkerRegistrar* PassiveForTypes( | |
38 const syncable::ModelTypeBitSet& set); | |
39 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) OVERRIDE; | |
40 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) OVERRIDE; | |
41 | |
42 private: | |
43 explicit MockModelSafeWorkerRegistrar(const ModelSafeRoutingInfo& routes); | |
44 | |
45 scoped_refptr<ModelSafeWorker> passive_worker_; | |
46 ModelSafeRoutingInfo routes_; | |
47 }; | |
48 | |
49 } // namespace browser_sync | |
50 | |
51 #endif // CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_ | |
52 | |
OLD | NEW |