| OLD | NEW |
| 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 #include "chrome/browser/sync/engine/mock_model_safe_workers.h" | 5 #include "chrome/browser/sync/engine/mock_model_safe_workers.h" |
| 6 | 6 |
| 7 namespace browser_sync { | 7 namespace browser_sync { |
| 8 | 8 |
| 9 ModelSafeGroup MockUIModelWorker::GetModelSafeGroup() { return GROUP_UI; } | 9 ModelSafeGroup MockUIModelWorker::GetModelSafeGroup() { return GROUP_UI; } |
| 10 | 10 |
| 11 ModelSafeGroup MockDBModelWorker::GetModelSafeGroup() { return GROUP_DB; } | 11 ModelSafeGroup MockDBModelWorker::GetModelSafeGroup() { return GROUP_DB; } |
| 12 | 12 |
| 13 ModelSafeGroup MockFileModelWorker::GetModelSafeGroup() { return GROUP_FILE; } |
| 14 |
| 13 MockModelSafeWorkerRegistrar::~MockModelSafeWorkerRegistrar() {} | 15 MockModelSafeWorkerRegistrar::~MockModelSafeWorkerRegistrar() {} |
| 14 | 16 |
| 15 // static | 17 // static |
| 16 MockModelSafeWorkerRegistrar* | 18 MockModelSafeWorkerRegistrar* |
| 17 MockModelSafeWorkerRegistrar::PassiveBookmarks() { | 19 MockModelSafeWorkerRegistrar::PassiveBookmarks() { |
| 18 ModelSafeRoutingInfo routes; | 20 ModelSafeRoutingInfo routes; |
| 19 routes[syncable::BOOKMARKS] = GROUP_PASSIVE; | 21 routes[syncable::BOOKMARKS] = GROUP_PASSIVE; |
| 20 MockModelSafeWorkerRegistrar* m = new MockModelSafeWorkerRegistrar(routes); | 22 MockModelSafeWorkerRegistrar* m = new MockModelSafeWorkerRegistrar(routes); |
| 21 m->passive_worker_ = new ModelSafeWorker(); | 23 m->passive_worker_ = new ModelSafeWorker(); |
| 22 return m; | 24 return m; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 47 ModelSafeRoutingInfo* out) { | 49 ModelSafeRoutingInfo* out) { |
| 48 *out = routes_; | 50 *out = routes_; |
| 49 } | 51 } |
| 50 | 52 |
| 51 MockModelSafeWorkerRegistrar::MockModelSafeWorkerRegistrar( | 53 MockModelSafeWorkerRegistrar::MockModelSafeWorkerRegistrar( |
| 52 const ModelSafeRoutingInfo& routes) { | 54 const ModelSafeRoutingInfo& routes) { |
| 53 routes_ = routes; | 55 routes_ = routes; |
| 54 } | 56 } |
| 55 | 57 |
| 56 } // namespace browser_sync | 58 } // namespace browser_sync |
| OLD | NEW |