Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_ | |
| 6 #define SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_ | |
| 7 | |
| 8 #include "sync/internal_api/public/internal_components_factory.h" | |
| 9 | |
| 10 namespace syncer { | |
| 11 | |
| 12 class TestInternalComponentsFactory : public InternalComponentsFactory { | |
| 13 public: | |
| 14 enum StorageOption { | |
| 15 // BuildDirectoryBackingStore should not use persistent on-disk storage. | |
| 16 IN_MEMORY, | |
| 17 // Use this if you want BuildDirectoryBackingStore to create a real | |
| 18 // on disk store. | |
| 19 ON_DISK | |
| 20 }; | |
| 21 | |
| 22 explicit TestInternalComponentsFactory(StorageOption option); | |
| 23 virtual ~TestInternalComponentsFactory(); | |
| 24 | |
| 25 virtual SyncScheduler* BuildScheduler( | |
| 26 const std::string& name, | |
| 27 sessions::SyncSessionContext* context) OVERRIDE; | |
| 28 | |
| 29 virtual sessions::SyncSessionContext* BuildContext( | |
| 30 ServerConnectionManager* connection_manager, | |
| 31 syncable::Directory* directory, | |
| 32 const ModelSafeRoutingInfo& routing_info, | |
| 33 const std::vector<ModelSafeWorker*> workers, | |
| 34 ExtensionsActivityMonitor* monitor, | |
| 35 ThrottledDataTypeTracker* throttled_data_type_tracker, | |
| 36 const std::vector<SyncEngineEventListener*>& listeners, | |
| 37 sessions::DebugInfoGetter* debug_info_getter, | |
| 38 syncer::TrafficRecorder* traffic_recorder) OVERRIDE; | |
| 39 | |
| 40 virtual syncable::DirectoryBackingStore* BuildDirectoryBackingStore( | |
| 41 const std::string& dir_name, | |
| 42 const FilePath& backing_filepath) OVERRIDE; | |
| 43 | |
| 44 private: | |
| 45 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.
| |
| 46 DISALLOW_COPY_AND_ASSIGN(TestInternalComponentsFactory); | |
| 47 }; | |
| 48 | |
| 49 } // namespace syncer | |
| 50 | |
| 51 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_ | |
| OLD | NEW |