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

Side by Side Diff: chrome/browser/sync/engine/mock_model_safe_workers.h

Issue 7891054: Add GROUP_FILE ModelSafeGroup (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_ 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_ 6 #define CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "chrome/browser/sync/engine/model_safe_worker.h" 12 #include "chrome/browser/sync/engine/model_safe_worker.h"
13 #include "chrome/browser/sync/syncable/model_type.h" 13 #include "chrome/browser/sync/syncable/model_type.h"
14 14
15 namespace browser_sync { 15 namespace browser_sync {
16 16
17 class MockUIModelWorker : public ModelSafeWorker { 17 class MockUIModelWorker : public ModelSafeWorker {
18 public: 18 public:
19 virtual ModelSafeGroup GetModelSafeGroup(); 19 virtual ModelSafeGroup GetModelSafeGroup();
20 }; 20 };
21 21
22 class MockDBModelWorker : public ModelSafeWorker { 22 class MockDBModelWorker : public ModelSafeWorker {
23 public: 23 public:
24 virtual ModelSafeGroup GetModelSafeGroup(); 24 virtual ModelSafeGroup GetModelSafeGroup();
25 }; 25 };
26 26
27 class MockFILEModelWorker : public ModelSafeWorker {
akalin 2011/09/14 18:11:11 FILE -> File
not at google - send to devlin 2011/09/14 19:09:19 Done.
28 public:
29 virtual ModelSafeGroup GetModelSafeGroup();
30 };
31
27 class MockModelSafeWorkerRegistrar : public ModelSafeWorkerRegistrar { 32 class MockModelSafeWorkerRegistrar : public ModelSafeWorkerRegistrar {
28 public: 33 public:
29 virtual ~MockModelSafeWorkerRegistrar(); 34 virtual ~MockModelSafeWorkerRegistrar();
30 static MockModelSafeWorkerRegistrar* PassiveBookmarks(); 35 static MockModelSafeWorkerRegistrar* PassiveBookmarks();
31 static MockModelSafeWorkerRegistrar* PassiveForTypes( 36 static MockModelSafeWorkerRegistrar* PassiveForTypes(
32 const syncable::ModelTypeBitSet& set); 37 const syncable::ModelTypeBitSet& set);
33 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out); 38 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out);
34 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out); 39 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out);
35 40
36 private: 41 private:
37 explicit MockModelSafeWorkerRegistrar(const ModelSafeRoutingInfo& routes); 42 explicit MockModelSafeWorkerRegistrar(const ModelSafeRoutingInfo& routes);
38 43
39 scoped_refptr<ModelSafeWorker> passive_worker_; 44 scoped_refptr<ModelSafeWorker> passive_worker_;
40 ModelSafeRoutingInfo routes_; 45 ModelSafeRoutingInfo routes_;
41 }; 46 };
42 47
43 } // namespace browser_sync 48 } // namespace browser_sync
44 49
45 #endif // CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_ 50 #endif // CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_
46 51
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/mock_model_safe_workers.cc » ('j') | chrome/browser/sync/glue/file_model_worker.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698