| Index: chrome/browser/sync/engine/mock_model_safe_workers.h
|
| diff --git a/chrome/browser/sync/engine/mock_model_safe_workers.h b/chrome/browser/sync/engine/mock_model_safe_workers.h
|
| index 3d0aa8a70f87edc0ac8591bd9108503fb574e880..a76a51cb2286b2087e01de2243400c1b2a11b672 100644
|
| --- a/chrome/browser/sync/engine/mock_model_safe_workers.h
|
| +++ b/chrome/browser/sync/engine/mock_model_safe_workers.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -6,20 +6,38 @@
|
| #define CHROME_BROWSER_SYNC_ENGINE_MOCK_MODEL_SAFE_WORKERS_H_
|
| #pragma once
|
|
|
| +#include <vector>
|
| +
|
| +#include "base/ref_counted.h"
|
| #include "chrome/browser/sync/engine/model_safe_worker.h"
|
| +#include "chrome/browser/sync/syncable/model_type.h"
|
|
|
| namespace browser_sync {
|
|
|
| class MockUIModelWorker : public ModelSafeWorker {
|
| public:
|
| - virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_UI; }
|
| - virtual bool CurrentThreadIsWorkThread() { return true; }
|
| + virtual ModelSafeGroup GetModelSafeGroup();
|
| + virtual bool CurrentThreadIsWorkThread();
|
| };
|
|
|
| class MockDBModelWorker : public ModelSafeWorker {
|
| public:
|
| - virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_DB; }
|
| - virtual bool CurrentThreadIsWorkThread() { return true; }
|
| + virtual ModelSafeGroup GetModelSafeGroup();
|
| + virtual bool CurrentThreadIsWorkThread();
|
| +};
|
| +
|
| +class MockModelSafeWorkerRegistrar : public ModelSafeWorkerRegistrar {
|
| + public:
|
| + virtual ~MockModelSafeWorkerRegistrar();
|
| + static MockModelSafeWorkerRegistrar* PassiveBookmarks();
|
| + virtual void GetWorkers(std::vector<ModelSafeWorker*>* out);
|
| + virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out);
|
| +
|
| + private:
|
| + explicit MockModelSafeWorkerRegistrar(const ModelSafeRoutingInfo& routes);
|
| +
|
| + scoped_refptr<ModelSafeWorker> passive_worker_;
|
| + ModelSafeRoutingInfo routes_;
|
| };
|
|
|
| } // namespace browser_sync
|
|
|