| 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 scoped_ptr<SyncScheduler> BuildScheduler( |
| 26 const std::string& name, |
| 27 sessions::SyncSessionContext* context) OVERRIDE; |
| 28 |
| 29 virtual scoped_ptr<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 scoped_ptr<syncable::DirectoryBackingStore> |
| 41 BuildDirectoryBackingStore( |
| 42 const std::string& dir_name, |
| 43 const FilePath& backing_filepath) OVERRIDE; |
| 44 |
| 45 private: |
| 46 const StorageOption storage_option_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(TestInternalComponentsFactory); |
| 49 }; |
| 50 |
| 51 } // namespace syncer |
| 52 |
| 53 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_ |
| OLD | NEW |