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 // InternalComponentsFactory exists so that tests can override creation of | |
| 6 // components used by the SyncManager that are not exposed across the sync | |
| 7 // API boundary. | |
| 8 | |
| 9 #ifndef SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_H_ | |
| 10 #define SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_H_ | |
| 11 | |
| 12 #include <string> | |
| 13 #include <vector> | |
| 14 | |
| 15 #include "base/file_path.h" | |
| 16 #include "sync/internal_api/public/engine/model_safe_worker.h" | |
|
Nicolas Zea
2012/07/18 21:10:12
can you just forward declare modelsaferoutinginfo
tim (not reviewing)
2012/07/18 21:57:47
nope, typedef.
| |
| 17 | |
| 18 namespace syncer { | |
| 19 | |
| 20 class ExtensionsActivityMonitor; | |
| 21 class ServerConnectionManager; | |
| 22 class SyncEngineEventListener; | |
| 23 class SyncScheduler; | |
| 24 class TrafficRecorder; | |
| 25 | |
| 26 class ThrottledDataTypeTracker; | |
| 27 | |
| 28 namespace sessions { | |
| 29 class DebugInfoGetter; | |
| 30 class SyncSessionContext; | |
| 31 } | |
| 32 | |
| 33 namespace syncable { | |
| 34 class Directory; | |
| 35 class DirectoryBackingStore; | |
| 36 } | |
| 37 | |
| 38 class InternalComponentsFactory { | |
| 39 public: | |
| 40 virtual ~InternalComponentsFactory() {} | |
| 41 | |
| 42 virtual SyncScheduler* BuildScheduler( | |
| 43 const std::string& name, | |
| 44 sessions::SyncSessionContext* context) = 0; | |
| 45 | |
| 46 virtual sessions::SyncSessionContext* BuildContext( | |
| 47 ServerConnectionManager* connection_manager, | |
| 48 syncable::Directory* directory, | |
| 49 const ModelSafeRoutingInfo& routing_info, | |
| 50 const std::vector<ModelSafeWorker*> workers, | |
| 51 ExtensionsActivityMonitor* monitor, | |
| 52 ThrottledDataTypeTracker* throttled_data_type_tracker, | |
| 53 const std::vector<SyncEngineEventListener*>& listeners, | |
| 54 sessions::DebugInfoGetter* debug_info_getter, | |
| 55 syncer::TrafficRecorder* traffic_recorder) = 0; | |
| 56 | |
| 57 virtual syncable::DirectoryBackingStore* BuildDirectoryBackingStore( | |
| 58 const std::string& dir_name, | |
| 59 const FilePath& backing_filepath) = 0; | |
| 60 }; | |
| 61 | |
| 62 } // namespace syncer | |
| 63 | |
| 64 #endif // SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_H_ | |
| OLD | NEW |