Chromium Code Reviews| Index: sync/internal_api/public/test/test_internal_components_factory.h |
| diff --git a/sync/internal_api/public/test/test_internal_components_factory.h b/sync/internal_api/public/test/test_internal_components_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..33c4ef137c11eb1ae9d11172c29677662e6656c0 |
| --- /dev/null |
| +++ b/sync/internal_api/public/test/test_internal_components_factory.h |
| @@ -0,0 +1,51 @@ |
| +// Copyright (c) 2012 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. |
| + |
| +#ifndef SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_ |
| +#define SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_ |
| + |
| +#include "sync/internal_api/public/internal_components_factory.h" |
| + |
| +namespace syncer { |
| + |
| +class TestInternalComponentsFactory : public InternalComponentsFactory { |
| + public: |
| + enum StorageOption { |
| + // BuildDirectoryBackingStore should not use persistent on-disk storage. |
| + IN_MEMORY, |
| + // Use this if you want BuildDirectoryBackingStore to create a real |
| + // on disk store. |
| + ON_DISK |
| + }; |
| + |
| + explicit TestInternalComponentsFactory(StorageOption option); |
| + virtual ~TestInternalComponentsFactory(); |
| + |
| + virtual SyncScheduler* BuildScheduler( |
| + const std::string& name, |
| + sessions::SyncSessionContext* context) OVERRIDE; |
| + |
| + virtual sessions::SyncSessionContext* BuildContext( |
| + ServerConnectionManager* connection_manager, |
| + syncable::Directory* directory, |
| + const ModelSafeRoutingInfo& routing_info, |
| + const std::vector<ModelSafeWorker*> workers, |
| + ExtensionsActivityMonitor* monitor, |
| + ThrottledDataTypeTracker* throttled_data_type_tracker, |
| + const std::vector<SyncEngineEventListener*>& listeners, |
| + sessions::DebugInfoGetter* debug_info_getter, |
| + syncer::TrafficRecorder* traffic_recorder) OVERRIDE; |
| + |
| + virtual syncable::DirectoryBackingStore* BuildDirectoryBackingStore( |
| + const std::string& dir_name, |
| + const FilePath& backing_filepath) OVERRIDE; |
| + |
| + private: |
| + const StorageOption storage_option_; |
|
Nicolas Zea
2012/07/18 21:10:12
nit: newline after?
tim (not reviewing)
2012/07/18 21:57:47
Done.
|
| + DISALLOW_COPY_AND_ASSIGN(TestInternalComponentsFactory); |
| +}; |
| + |
| +} // namespace syncer |
| + |
| +#endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_ |