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

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

Issue 5939006: sync: beginnings of MessageLoop based SyncerThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: linux compile Created 9 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/sync/engine/mock_model_safe_workers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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>
10
11 #include "base/ref_counted.h"
9 #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"
10 14
11 namespace browser_sync { 15 namespace browser_sync {
12 16
13 class MockUIModelWorker : public ModelSafeWorker { 17 class MockUIModelWorker : public ModelSafeWorker {
14 public: 18 public:
15 virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_UI; } 19 virtual ModelSafeGroup GetModelSafeGroup();
16 virtual bool CurrentThreadIsWorkThread() { return true; } 20 virtual bool CurrentThreadIsWorkThread();
17 }; 21 };
18 22
19 class MockDBModelWorker : public ModelSafeWorker { 23 class MockDBModelWorker : public ModelSafeWorker {
20 public: 24 public:
21 virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_DB; } 25 virtual ModelSafeGroup GetModelSafeGroup();
22 virtual bool CurrentThreadIsWorkThread() { return true; } 26 virtual bool CurrentThreadIsWorkThread();
27 };
28
29 class MockModelSafeWorkerRegistrar : public ModelSafeWorkerRegistrar {
30 public:
31 virtual ~MockModelSafeWorkerRegistrar();
32 static MockModelSafeWorkerRegistrar* PassiveBookmarks();
33 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out);
34 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out);
35
36 private:
37 explicit MockModelSafeWorkerRegistrar(const ModelSafeRoutingInfo& routes);
38
39 scoped_refptr<ModelSafeWorker> passive_worker_;
40 ModelSafeRoutingInfo routes_;
23 }; 41 };
24 42
25 } // namespace browser_sync 43 } // namespace browser_sync
26 44
27 #endif // CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_ 45 #endif // CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_
28 46
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/mock_model_safe_workers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698